mysql icon indicating copy to clipboard operation
mysql copied to clipboard

Connection closed unexpectedly

Open allserialtv opened this issue 2 years ago • 4 comments

Hello

I randomly get this error when use Mysql Amp library. "The connection has been closed in"

The problem is random and here what i noticed: When i use Database which is queried by another script i randomly get this error.

When i use another database which is not under the load (not queried by another script). I can't see this problem.

So it looks like a problem with some mysql settings when database is under the load. Do you have any idea how to fix it?

Thanks

allserialtv avatar Dec 06 '23 16:12 allserialtv

Have a look at the database server and how many connections it allows and monitor that number, that might be it.

kelunik avatar Dec 06 '23 18:12 kelunik

I have set maximum 30k. I can't set more because of limitation of my maria db. Still gets this error. Any suggestions?

MariaDB [(none)]> SHOW VARIABLES LIKE 'max_connections' -> ; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 29538 |

allserialtv avatar Dec 07 '23 10:12 allserialtv

It is not possible to see reason why exact query failed with Connection closed status. I am stuck(

allserialtv avatar Dec 07 '23 10:12 allserialtv

Unfortunately I'm not sure what could be going on here other than the obvious – the server seems to be dropping the connection for some reason.

Would you be able to upgrade to v3 of this library? The connection handling has been greatly improved in that version and may shed some additional light on what is happening.

trowski avatar Dec 30 '23 19:12 trowski