patternsqlMinor
MySQL failed connection attempts hitting max_connections
Viewed 0 times
hittingmax_connectionsmysqlattemptsfailedconnection
Problem
I run a couple of websites but I believe one of them is causing too many
Currently,
Connections Failed Attempts that causes max_connections variable to hit.Currently,
max_connections=2500 (already large) but total connections per hour due to failed attempts have become greater than 3000. How do I debug this? The httpd error log for the website does show a couple of PHP warnings/notices though. For example, using mysqli instead in the database config.Solution
I don't think the failed connections are causing the max connections issue, but can you set log_warnings=2 and after a short time, view the error log to see if there is more information there? The error log would record something like "access denied for user 'user'@'host'..."
The command to set log_warnings=2 is:
You can find the error log like this:
What version of mysql are you running?
Can you also show the output of:
and:
The command to set log_warnings=2 is:
set global log_warnings=2;You can find the error log like this:
show global variables like 'log_error';What version of mysql are you running?
Can you also show the output of:
show global variables like 'skip_name_resolve';and:
show global status like 'max_used_connections';Code Snippets
set global log_warnings=2;show global variables like 'log_error';show global variables like 'skip_name_resolve';show global status like 'max_used_connections';Context
StackExchange Database Administrators Q#139305, answer score: 2
Revisions (0)
No revisions yet.