Closed xpader closed 3 years ago
Same problem here... =[
Could you please write a simple script reproducing the issue?
It's just normal use, and the issue only happens probabilistically. I used in my framework: https://github.com/xpader/workerman-amphp-framework/blob/master/src/framework/Db/Connection.php like fetchOne() and fetchAll() And any query may have this problem..
There's an interest thing today. One of our MySQL server is slow respond and almost gone, the simple primary key query running about 300 seconds and more, and there's lots of table lock on very simple query.. The MySQL server has running about ten years, and we restart it.. After that, "Connection closed unexpectedly" is never show so far..
So, I think the problem is not amphp/mysql, it's out server's problem..
The mysql client randomly throw " Amp\Sql\ConnectionException: Connection closed unexpectedly",my MySQL Server is very stable when using mysqlnd or connect with Java, The exception throw from couple minutes or about half hours.
MySQL timeout settings:
amphp/mysql pool max idle time I have tried: 10, 30, 60, 120, all have this problem..