Find the answer to your Linux question:
Results 1 to 6 of 6
I was logged into our custom web application 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) ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Feb 2007
    Location
    USA
    Posts
    221

    Strange Server Issue - Solved But I am Still Puzzled


    I was logged into our custom web application 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)

    I did some googling on the subject but did not find an 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 the 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.

    1.) Does anyone have an idea of what might have caused the lost connection and the resulting MySQL error?

    Here is the last line of the Apache error log before rebooting.

    [Sat Nov 21 20:57:18 2009] [error] [client XX.XXX.XX.XXX] PHP Notice: Undefined index: use_set_names_utf8 in /srv/www/htdocs/gers/library/billing.php on line 11, referer: http://XX.XXX.XXX.XXX/gers/interface/summary/weekly.php
    PHP Warning: Module 'fileinfo' already loaded in Unknown on line 0
    [Sun Nov 22 12:47:56 2009] [notice] Apache/2.2.3 (Linux/SUSE) configured -- resuming normal operations

    2.) Is this the result of the machine (Dell Power Edge SC1430 -Dual Core Intel® Xeon® 5110; 4MB Cache, 1.6GHz, 1066MHZ FSB) running constantly for over 2 months?

    Thanks.

    -Mike
    Suse Linux Enterprise Server 11
    Suse Linux Enterprise Server 10 - SP3
    OpenSuse 11.2, KDE 4.3.1

  2. #2
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,104
    Not as such. The fact is memory could be the problem. Because most memory today is not ECC it is possible that random occurrence can reset a memory bit undetected and uncorrected. This of course does not happen often. But since totally random it does not depend on how long a machine runs. The same can happen with disk reads/writes. Again very rare but totally random. Look at any specs on any hardware, error rates are nonzero. Then there is power fluctuation. Is your power very well regulated and filtered? It boils down to one event does not mean very much if you see a pattern of occurrence then you can start looking for a possible design or operational error.

  3. #3
    Linux Newbie
    Join Date
    Feb 2007
    Location
    USA
    Posts
    221
    Thanks gogalthorp!!
    Suse Linux Enterprise Server 11
    Suse Linux Enterprise Server 10 - SP3
    OpenSuse 11.2, KDE 4.3.1

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Feb 2007
    Location
    USA
    Posts
    221
    In looking into ErrCode: 30 (it means a "read-only file system") I found several pages of information ( one example here: Mysql Errcode: 30 - openSUSE Forums) that show the behavior I experienced seem to be attributed to permission issues, corruption, disk full, or disk failings of the mysql directory/files.
    I also learned about the "mysqlcheck" command.

    Should I get into the practice of running "mysqlcheck" on a regular basis for proper MySQL database maintenance?

    -Mike
    Suse Linux Enterprise Server 11
    Suse Linux Enterprise Server 10 - SP3
    OpenSuse 11.2, KDE 4.3.1

  6. #5
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,104
    Couldn't hurt

    Also periodic low level disk scans.

    The question is how important is 24/7 99.999% reliability to your situation.

    If you have great need then mirrored servers with automatic fail over redundant backup power and conditioning redundant Internet connection ECC memory etc can be used.

    Do you have the SQL database on a separate mounted partition? If you have it on the root partition and there is short space temp files can create temporarily out of space conditions. IMO significance databases should reside on their own partition. Reduces confusion about space availability. Also makes backup more straight forward and easy.

  7. #6
    Linux Newbie
    Join Date
    Feb 2007
    Location
    USA
    Posts
    221
    Quote Originally Posted by gogalthorp View Post
    Couldn't hurt
    The question is how important is 24/7 99.999% reliability to your situation.
    "24/7 99.999% reliability" is important to my situation. Currently I have an off site mirror of my web root that I learned from this tutorial:

    Mirror Your Web Site With rsync | HowtoForge - Linux Howtos and Tutorials

    Unfortunately I was not successful in getting MySQL replication to the mirror server working from the directions in this tutorial:

    How To Set Up Database Replication In MySQL | HowtoForge - Linux Howtos and Tutorials

    My work around is to run AutoMySQLBackUp nightly and then I mirror that directory to my mirrored server.

    Quote Originally Posted by gogalthorp View Post
    If you have great need then mirrored servers with automatic fail over redundant backup power and conditioning redundant Internet connection ECC memory etc can be used.
    1. Do you mean to have a mirrored server on site? One potential problem with my off-site mirror is that we use Hylafax and Avantfax on a daily basis. If the main server were to go down, faxing would not be possible with the mirrored server because it is located in a different telephone exchange area.

    My ideal situation would be to have faxing capability on the mirror server as well. Or is that over kill?


    Quote Originally Posted by gogalthorp View Post
    Do you have the SQL database on a separate mounted partition?
    No I do not have the MySQL database on its own partition but now I am thinking about doing that when I upgrade the box to SLES11.

    1. Would it be easier to mirror the MySQL database if it were on its own partition? If I were to put MySQL on its own partition could I simply mirror that partition with rsync and avoid the MySQL Database Replication tutorial ( http://www.howtoforge.com/mysql_database_replication)?

    -Mike
    Suse Linux Enterprise Server 11
    Suse Linux Enterprise Server 10 - SP3
    OpenSuse 11.2, KDE 4.3.1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •