For many weeks I have had a problem with a simple SQL query where from time to time the MySQL server has crashed. But recently it is crashing every day, 1-2 times a day.

The query is very simple:

SELECT ... from table where field = 'some string' LIMIT 1

The table has 15 rows and the "field" where the query selects has an index. The explain is very good and shows that the index is used.

The table is innodb. At the beginning I used MyISAM but the problem is still the same. After the crashes began I have transformed it into InnoDB but this does not help.

Where can be the problem be?

Server version: 5.0.51a-24+lenny3 (Debian) mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (x86_64) using readline 5.2

Thank you very much!


Nothing in the server logs ? Do you have enough free space on the partition for the transaction logs ?

Have you tried reinstalling it ? (apt-get purge then apt-get install)

  • Which server logs? Where should I look? There is enough free space on the partition. I have found that the server is crashed every time when this query is executed and in this time is running another job. But both jobs are using different tables. – Nik Aug 1 '10 at 21:14
  • Try to take a look at the last lines of /var/log/mysql/mysql.log just after a crash – Kedare Aug 2 '10 at 11:56

If you have enough disk space and this kind of problem has just recently occurred, I suspect some failing hardware; a bad RAM stick, a failing CPU or heat problem.

Can you try this on another server? Copy the database there and try to repeat the problem. If it cannot be repeated, hardware problem is even more probable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy