The service mysql appears to be down but it isn't down
Hi there,
I have 2 servers running with WHM/cPanel and with both I have the same problems. Whenever I must reboot my servers because of kernel updates I am notified that mysql appears to be down, but it isn't down. After long research I found what is caused by and found a solution for this issue. It seems to be that mysql can't lock ./ibdata1 when the server will be gracefull restarted.
[QUOTE]/var/lib/mysql# mv ibdata1 ibdata1.bak
/var/lib/mysql# cp -a ibdata1.bak ibdata1
/var/lib/mysql# rm ibdata1.bak
This works, but doesn't solves the cause and I am wondering why I am the only one with this problem?! So what is wrong?
This works, but doesn't solves the cause and I am wondering why I am the only one with this problem?! So what is wrong?
-
That's an odd issue and not the standard behavior, what is in the my.cnf file? 0 -
performance-schema=0 default-storage-engine=MyISAM innodb_file_per_table=1 innodb_buffer_pool_instance=1 max_allowed_packet=268435456 open_files_limit=655350 query_cache_type=1 key_buffer_size=1024k max_connections=150 max_tmp_tables=1 table_open_cache=60000 local-infile=1 query_cache_limit=512M thread_cache_size=4 query_cache_size=32M join_buffer_size=2M innodb_use_native_aio=0 slow_query_log=0 long_query_time=5 sort_buffer_size=6M max_heap_table_size=512M tmp_table_size=512M0 -
Hello, Thanks for that, if you do the following to use a default generated a mysql configuration file: mv /etc/my.cnf{,.bk}
[CODE=bash]/usr/local/cpanel/bin/build_mysql_conf
/scripts/restartsrv_mysql
Does the issue persist?0 -
I will try it, but I believe I know what the reason ist. Affected are only innodb databases and they crash sometimes if I do a server restart. For this databases I use local-infile function. A cron is archieving data from Piwik/Matomo and needs local-infile to archieve. I am not not shure, but this could be the reason. To exclude it, it would be necessary to disable mysql server before restart, but don't know how to to disable mysql server without automatic restart. Is ist possible to disable mysql server without automatic restart? 0 -
To do this you'd need to ensure that chkservd is not set to restart it when it finds it down. You would need to go to WHM>>Service Configuration>>Service Manager -> and disable MySQL from being enabled and monitored. Once that's done you would run: /scripts/restartsrv_mysql --stop
Make your changes then restart it with:/scripts/restartsrv_mysql --start
Once that's completed don't forget to reenable the service in the Service Manager0
Please sign in to leave a comment.
Comments
5 comments