LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   mysql crash (https://www.linuxquestions.org/questions/linux-server-73/mysql-crash-4175416323/)

madunix 07-12-2012 05:44 AM

mysql crash
 
Lately I got this messgae in my errorLog file on my old mysql server, need more datails why the DB was restarted!

120711 19:42:06 mysqld restarted
120711 19:42:06 [Warning] Asked for 196608 thread stack, but got 126976
120711 19:42:07 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
120711 19:42:07 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 4 4031987031.
InnoDB: Doing recovery: scanned up to log sequence number 4 4031987031
InnoDB: Last MySQL binlog file position 0 78062804, file name ./abc-bin.000097
120711 19:42:07 InnoDB: Flushing modified pages from the buffer pool...
120711 19:42:07 InnoDB: Started; log sequence number 4 4031987031
/usr/sbin/mysqld: ready for connections.
Version: '4.1.14-standard-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Edition - Standard (GPL)


my.cnf

$ cat /etc/my.cnf
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
############################Added by ashakhshir for logging##################
long_query_time=4
log-slow-queries=/var/log/slowQueryLog.log
#log-queries-not-using-indexes
###########################################################################
log=/var/log/generalQueryLog.log
log-error=/var/log/errorLog.log
#
#skip-networking

# Replication Master Server (default)
# binary logging is required for replication
log-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1

innodb_buffer_pool_size = 1024M
innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 2
innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout



free
total used free shared buffers cached
Mem: 3115072 3032624 82448 0 130424 1958676
-/+ buffers/cache: 943524 2171548
Swap: 4096564 184 4096380

TB0ne 07-12-2012 10:09 AM

Quote:

Originally Posted by madunix (Post 4725924)
Lately I got this messgae in my errorLog file on my old mysql server, need more datails why the DB was restarted!

120711 19:42:06 mysqld restarted
120711 19:42:06 [Warning] Asked for 196608 thread stack, but got 126976
120711 19:42:07 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
120711 19:42:07 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 4 4031987031.
InnoDB: Doing recovery: scanned up to log sequence number 4 4031987031
InnoDB: Last MySQL binlog file position 0 78062804, file name ./abc-bin.000097
120711 19:42:07 InnoDB: Flushing modified pages from the buffer pool...
120711 19:42:07 InnoDB: Started; log sequence number 4 4031987031
/usr/sbin/mysqld: ready for connections.
Version: '4.1.14-standard-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Edition - Standard (GPL)

No idea, and there's little chance anyone can tell you from what you've posted. The message is clear: MySQL wasn't shut down normally. So, either someone killed the process, instead of doing a "mysqld stop", or the server was powered off/shut down incorrectly.

Check the MySQL logs for info, check your system uptime, and look at the .bash_history logs for your users (and root, too), to see if someone killed the DB process.


All times are GMT -5. The time now is 04:14 PM.