You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. What did you do? If possible, provide a simple script for reproducing the error.
Created a MySQL PDOPool to fetch connections with PDOPool::get() and put them back with PDOPool::put($con) after the HTTP response has been served. wait_timeout of the DBMS is very low (60 seconds), but this problem also occurs with larger values, only later.
2. What did you expect to see?
I expect PDOPool::get() to return a working connection and check for terminated connections.
3. What did you see instead?
After some successful connections and waiting for the connection timeout to occur PDOPool::get() returns a terminated connection resulting in error 2006 MySQL server has gone away
Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => On => On
swoole.unixsock_buffer_size => 8388608 => 8388608
5. What is your machine environment used?
Linux 1100dd632f36 4.19.121-linuxkit #1 SMP Thu Jan 21 15:36:34 UTC 2021 x86_64 Linux
I’ve tried working around this issue by catching the PDOException 2006 MySQL server has gone away. How can I remove a terminated connection from PDOPool?
1. What did you do? If possible, provide a simple script for reproducing the error.
Created a MySQL
PDOPool
to fetch connections withPDOPool::get()
and put them back withPDOPool::put($con)
after the HTTP response has been served.wait_timeout
of the DBMS is very low (60 seconds), but this problem also occurs with larger values, only later.2. What did you expect to see?
I expect
PDOPool::get()
to return a working connection and check for terminated connections.3. What did you see instead?
After some successful connections and waiting for the connection timeout to occur
PDOPool::get()
returns a terminated connection resulting in error 2006 MySQL server has gone away4. What version of Swoole are you using?
5. What is your machine environment used?
The text was updated successfully, but these errors were encountered: