JIRA: pool-test-while-idle not working

Hello,

i see a lot of connection errors in the mysql server log file:

2018-01-20T00:57:48.888433Z 15848 [Note] Aborted connection 15848 to db: 'xx' user: 'xx' host: 'xxx' (Got timeout reading communication packets)

 

The connections are closed after the idle timeout is reached (400 seconds).

 

As far as i understand the configuration, this should not happen, because the validation query should be executed before:

 

<pool-min-size>20</pool-min-size>
    <pool-max-size>20</pool-max-size>
    <pool-max-wait>30000</pool-max-wait>
    <validation-query>select 1</validation-query>
    <min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis>
    <time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis>
    <pool-max-idle>20</pool-max-idle>
    <pool-remove-abandoned>true</pool-remove-abandoned>
    <pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
    <pool-test-while-idle>true</pool-test-while-idle>
    <validation-query-timeout>3</validation-query-timeout>

 

JIRA Version: 7.7 and 7.5.1.

Thanks

Andi

 

1 answer

0 vote

Hi Andi,

  • Do you see any pattern to the users being disconnected in this manner?

I did some research and found there are other possibilities for this behavior:

  • The client connected successfully but terminated improperly (and may relate to not closing the connection properly)
  • The client slept for longer than the defined wait_timeout or interactive_timeout seconds (which ends up causing the connection to sleep for wait_timeout seconds and then the connection gets forcibly closed by the server)
  • The client terminated abnormally or exceeded the max_allowed_packet for queries

At this point try the following:

 

  • Increasing the connection_time
  • Increasing the max packet size in MySQL

 

Please also take a look at the following resources as well:

Let me know what you find.  If this doesn't help let me know and we'll go from there.

Cheers,

Branden

Hi Brandon,

>Do you see any pattern to the users being disconnected in this manner?

I do not see any pattern.

There is no load on the server. Most of the time jira is idle: no user is logged in.

 

I think the reason is

The client slept for longer than the defined wait_timeout or interactive_timeout seconds (which ends up causing the connection to sleep for wait_timeout seconds and then the connection gets forcibly closed by the server)

But i thought that "time-between-eviction-runs-millis" and "pool-test-while-idle" should wake up the client. It seems that this is not happening.

 

I changed the following settings:

 <pool-min-size>2</pool-min-size>

<pool-max-idle>4</pool-max-idle>

 

Now, idle connections are closed and i do not see the error messages any more.

Thanks

Andi

Hi Andreas,

Thanks for following up and I'm glad you're not seeing this behavior anymore.  Let's give it a few days and if you see this again let me know.  If you don't see this behavior again this week we'll consider it resolved!

Cheers,

Branden

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 21, 2018 in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

1,206 views 10 18
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you