MySQL corrupted table
Today it happened again. For the third time in the last two weeks, my user table got corrupt. I don't know what the problem isBesides that, the server has also a lot of trouble with the fact tha MySQLd just stops functionizing somehow, and the only way to kill the proces is 'killall -9 mysqld'. Sometimes the whole server crashes, no SSH/ping, and the only option to get it back only is through the reboot function that my dedicated server hosting offers me.
If the table gets corrupt, it is always easy to restore with REPAIR TABLE user; without losing data. Nonetheless i need to find what causes this problem
Information on the server:
- Dual AMD MP 2600
- 2 GB memory
- Debian 3.0 Woody
- Linux 2.4.18-sb-smp #1 SMP Tue Jul 27 17:39:37 UTC 2004 i686 unknown
- mysql Ver 11.16 Distrib 3.23.49, for pc-linux-gnu (i686)
I'm using mysql_connect from another server (webserver: AMD MP 2600, 1GB ram). They're not connected internally, so we need to make an external connection.
Errors:
Code:
mysql> CHECK TABLE user; +-------------+-------+----------+--------------------------------------------------------+ | Table | Op | Msg_type | Msg_text | +-------------+-------+----------+--------------------------------------------------------+ | omerta.user | check | warning | Table is marked as crashed | | omerta.user | check | warning | 4 clients is using or hasn't closed the table properly | | omerta.user | check | error | Checksum for key: 2 doesn't match checksum for records | | omerta.user | check | error | Corrupt | +-------------+-------+----------+--------------------------------------------------------+ mysql> CHECK TABLE user EXTENDED; +-------------+-------+----------+--------------------------------------------------------+ | Table | Op | Msg_type | Msg_text | +-------------+-------+----------+--------------------------------------------------------+ | omerta.user | check | warning | Table is marked as crashed | | omerta.user | check | warning | 4 clients is using or hasn't closed the table properly | | omerta.user | check | error | Record at: 116104 Can't find key for index: 2 | | omerta.user | check | error | Corrupt | +-------------+-------+----------+--------------------------------------------------------+
Code:
mysqld got signal 11; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked agaist is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail key_buffer_size=157282304 record_buffer=131072 sort_buffer=2097144 max_used_connections=140 max_connections=500 threads_connected=31 It is possible that mysqld could use up to key_buffer_size + (record_buffer + sort_buffer)*max_connections = 1241592 K bytes of memory Hope that's ok, if not, decrease some variables in the equation
Because logging of all the queries takes about 10GB space/per day, i put that option off.
I don't know what to do! Someone with a clue?