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

This widget could not be displayed.

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

I seem to be seeing the same problem. This is also causing error messages on the JIRA side since it seems to try to use aborted idle connections, and then complains when they're dead (unsurprisingly). This always happens after a longer idle period, and once I refresh the page it goes away. The database server I use it with is the official mariadb docker container, largely in default configuration.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Apr 22, 2018 in Jira Software

How-to setup a secured Jira Software 7.9.0 on Ubuntu 16.04.4 in less than 30 minutes

...PermissionsStartOnly=true User=www-data Group=www-data ExecStart=/opt/jira/bin/startup.sh ExecStop=/opt/jira/bin/shutdown.sh TimeoutStartSec=120 TimeoutStopSec=600 PrivateTmp=true [Install] WantedBy...

1,492 views 10 12
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