I was logged into openemr from off site when I suddenly lost connection to the application. I received this error:
Can’t create/write to file ‘/var/lib/mysql/.tmp/#sql_d31_0.MYI’ (Errcode: 30)
We have been using OpenEMR since version 2.83 ( currently using 3.0). I did some googling on the subject but did not find a definitive answer. I was guessing that the Internet connection was down at the office because I was unable to ping the server.
So I drove to the office to investigate. The Internet was up as I could connect from other desktops and interestingly I could ping the server (SLES10-SP2) from inside the network although
I was not able to ping it from off site. The server display was unresponsive and remained black. I tried hitting several keys on the keyboard but was still unable to get the display to respond.
As a last resort I hit the power button and turned the server off (it has not been rebooted in a little over 2 months). I let it sit for a couple minutes then turned it back on.
Everything was fully functional and back to normal with no MySQL error message.
Here is the last line of the Apache error log before rebooting.
PHP Notice: Undefined index: use_set_names_utf8 in /srv/www/htdocs/openemr/library/translation.inc.php on line 11, referer: http://XX.XXX.XXX.XXX/openemr/interface/patient_file/summary/patient_summary.php
PHP Warning: Module ‘fileinfo’ already loaded in Unknown on line 0
Apache/2.2.3 (Linux/SUSE) configured - resuming normal operations
Was this caused by the “PHP Notice: Undefined index”?
Notices are generally just benign things, so wouldn’t attribute to that. Do a google search on ErrCode: 30 (it means a “read-only file system”) and brings up several pages, , that give your behavior that seem to be attributed to permission issues, corruption, disk full, or disk failings of the mysql directory/files. I’d check those things and for mysql database corruption with mysqlcheck command.
I will check out some more links on the matter. I want to make sure that MySQL has not become corrupted. I am going to run the “mysqlcheck” command you mention and look into other MySQL utilities.
Might want to run an fsck on your /var filesystem too, problems in /var are no fun since MySQL lives there. Lots of other important OS stuff in there too, so that might help to explain the server being locked up & unresponsive.
Some people run mysqlcheck nightly, I’m not sure that’s necessary, depends on the server load & number of active databases I suppose. Running it weekly certainly wouldn’t hurt anything, & you can always cron it to run on the weekend when nobody’s using the system.
Perhaps I should put MySQL on its own partition. I was thinking of doing that when I upgrade my server OS in the next couple of months. Do you see any problems with having MySQL on its own partition?