Bug #86117 reconnect is very slow
Submitted: 27 Apr 2017 16:28 Modified: 28 Apr 2017 13:05
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Shell General / Core Client Severity:S3 (Non-critical)
Version:1.0.9 OS:Any
Assigned to: CPU Architecture:Any

[27 Apr 2017 16:28] Daniël van Eeden
Description:
mysql-sql> select version();
ERROR: 5166: MySQL server has gone away
The global session got disconnected.
Attempting to reconnect to 'msandbox@localhost:33060'..
The global session was successfully reconnected.

From strace -r -f -p $(pidof mysqlsh):
     0.000046 epoll_wait(5, [], 128, 0) = 0
     0.000038 epoll_wait(5, [{EPOLLIN, {u32=30711348, u64=30711348}}], 128, -1) = 1
    60.000196 timerfd_settime(6, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=300, tv_nsec=0}}, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=0}}) = 0
     0.000297 close(7)                  = 0
     0.000293 close(14)                 = 0
     0.000106 close(5)                  = 0
     0.000063 close(6)                  = 0
     0.000056 close(4)                  = 0

How to repeat:
Run SELECT VERSION();
Restart the server
Run SELECT VERSION();
[27 Apr 2017 16:31] Daniël van Eeden
This is with Session type: Node
[28 Apr 2017 13:05] Umesh Shastry
Hello Daniël,

Thank you for the report.
Verified as described.

Thanks,
Umesh
[20 Mar 14:51] Alfredo Kojima
Posted by developer:
 
I can repro this in OEL7, but not in macos or Ubuntu. Umesh was using Fedora.
[11 Sep 21:31] Juan Rene Ramirez Monarrez
Posted by developer:
 
Hi Umesh

I have tried reproducing this issue using shell 8.0.13, 8.0.12 and 8.0.11 and servers 5.7.22 and 8.0.13 with no success.

In all cases the reconnection is immediate as soon as the server is back online.

Would you mind giving it another try, in case you can reproduce it please indicate:

- Platform
- Server Version
- Shell Version

So I can proceed and repeat exactly the same scenario that you used.

I appreciate your report and the extra effort required.

thx!