Debug mysqld goes offline
I have a production server with mysql database that keeps going offline. I have to restart mysqld to bring it back up. This happens about twice a day.
php 5.3.1 with cgi/fastcgi
mysql 5.44.1 with odbc support enabled
Mainly this server handles data entry through a web interface. However, we have some data reports that we run through microsoft access (there is a msaccess db that some users have on their desktops that can perform these queries and reports) that links to the tables with an odbc driver version 5.1
How can I track this down? I don't see anything unusual in /var/log/mysqld.log
1. Just migrated to new fedora 12 server from fedora 10 server. Same problem existed on the previous server.
2. Running msaccess queries does not cause mysqld to freeze. These queries do execute successfully.
I suspect some sort of memory problem since the server will be fine for a while but then fail after a period of increased use for apparently no reason. Could this be related to Innodb settings for mysql or perhaps hard drive "write-back" cache? Would adjusting my settings in /etc/my.cnf be helpful?
Stumped ... any help - thanks in advance!
The munin memory chart suggests to me that I have a memory leak in an application. It rises linearly until the swap is nearly maxed out then drops off shortly before mysql is noted to fail.
Check it out: http://picella.com/wiki/docs/memory.pdf
I have a number of php scripts running ... perhaps I have persistent connections somewhere? I have written a number of my own php scripts and I can see in mysql that one there are quite a few processes open by one of the database users that my scripts rely on.
Does anyone know how to track this down? Shouldn't php scripts close all open connections at the termination of the script?
See the attachement
php memory leak problem
$xml = simplexml_load_file(URL);
I released the memory at the end of the script with
... and now everything is good.
Here is the new chart. You can see the memory leak is not occurring anymore when running this script every 5 min in crontab.
|All times are GMT +2. The time now is 05:16.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.