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

"Too many connections" in error log #1202

Open
dfabulich opened this issue Dec 9, 2024 · 3 comments
Open

"Too many connections" in error log #1202

dfabulich opened this issue Dec 9, 2024 · 3 comments

Comments

@dfabulich
Copy link
Collaborator

dfabulich@sack:~$ sudo grep "Too many conn" /var/log/apache2/error.log | head -1
[Mon Dec 09 16:44:24.693076 2024] [php7:warn] [pid 1125171:tid 1125171] [client 154.47.20.215:0] PHP Warning:  mysqli_connect(): (08004/1040): Too many connections in /var/www/html/dbconnect.php on line 76
dfabulich@sack:~$ sudo grep "Too many conn" /var/log/apache2/error.log | wc -l
838

When this happens, the site throws a 500 error whatever page happens to cause it (usually viewgame).

@salty-horse
Copy link
Collaborator

Is it just a matter of increasing connections in mysql, or are there code changes needed (like connection pooling?)

@dfabulich
Copy link
Collaborator Author

Typically I've gone hunting around in the slow query log when this comes up. I guess it's that time of year again…?

@dfabulich
Copy link
Collaborator Author

The slow query log showed 2700 instances of #1203, which is now fixed. I'll keep an eye on this for the next week, but I think we're probably out of the woods.

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

No branches or pull requests

2 participants