Closed Maxopoly closed 8 years ago
Can you check /etc/mysql/my.cnf and see what the connection limit is?
I have a sneaking suspicion that we're running out of available connections, so reconnects are failing.
max_connections = 100 │···························································· connect_timeout = 5 │···························································· wait_timeout = 600 │···························································· max_allowed_packet = 16M │···························································· thread_cache_size = 128 │···························································· sort_buffer_size = 4M │···························································· bulk_insert_buffer_size = 16M │···························································· tmp_table_size = 32M │···························································· max_heap_table_size = 32M
What does show status where
variable_name= 'Threads_connected';
show when run?
85 after just restarting
Culprit: very likely found. Hmm.
If you've got sudo (I think you do) bump the max_connections to 300. sudo service mysql restart
to hup it, although it will cause everything to be very angry with you as it'll hard term any active connections. This will probably not be needed on the non-global DB server.
Alternatively just stop the cluster, restart the DB service, the start the cluster of course...
I think I have sudo, but I never got a password, so I guess it'll have to wait. But at least we got it solved.
Yeah. I'm about 90% sure this is root cause.
I have sudo
Check by issuing sudo su
. Enter your own account's password. If your account doesn't have a password, you can add a strong one via passwd
unless that's been disabled. Definitely use as strong a password as you can tolerate :).
I can't even get into my user though, as I automatically get logged into civcraft-admins every time and would need my password to switch.
OH, Gotcha. When you exit
out of civcraft-admins you don't wind up as your user?
Ah yeah, I can do that but it requests my sudo password when doing sudo su and the current unix password when doing passwd.
Waiting it is, then :D
No longer happening after https://github.com/Civcraft/JukeAlert/commit/a71921c3fb5bcae299c11ba114fb80b7940a496b
Sometimes JA will just lose db connection and every single db hit will then throw an exception. Happening multiple times daily in CivTemp for the last few days. Manual restart is required every time this breaks.