Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection closed unexpectedly #131

Open
allserialtv opened this issue Dec 6, 2023 · 4 comments
Open

Connection closed unexpectedly #131

allserialtv opened this issue Dec 6, 2023 · 4 comments
Labels

Comments

@allserialtv
Copy link

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

@kelunik
Copy link
Member

kelunik commented Dec 6, 2023

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

@allserialtv
Copy link
Author

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
Copy link
Author

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

@trowski
Copy link
Member

trowski commented Dec 30, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants