Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.
This object is in archive! 

MySQL monitoring - take account of start in progress

Will Harrison shared this idea 11 years ago
Needs Feedback

Cpanel chksrvd monitoring does not seem to take into account the mysql may be in the process of starting and doing an crash recovery. As this can take a bit of time chksrvd may try and restart again and again making the database state worse. Not good. A more intelligent monitoring that checks state would be good.

Best Answer
photo

Generally it is advised that you temporarily disable the monitoring for MySQL if you are starting in on something as severe and as manual as a database crash recovery. It is a bit awkward, in my opinion, to expect the service for attempting to get a service back "online" at all costs to make exceptions where it would choose to leave a service "offline".


The advised process:


(1) "WHM -> Service Manager" and uncheck the "Monitor" checkbox for MySQL

(2) Perform your database crash recovery

(3) Go back into WHM and re-check the box to enable monitoring again


This would guarantee cPanel & WHM will not attempt to get MySQL back online while you perform your maintenance.


However, I do welcome further feedback and comments on this feature request to gauge customer interest. I am concerned with any situation where you're asking chkservd to willingly leave a service offline. It opens the potential for false positives and therefore chkservd leaving your service online until you or your customers notice.


It seems more reasonable for a rare manual action (crash recovery) to expect a manual action (disabling monitoring for MySQL), versus attempting to automate chkservd to recognize and ignore crash recovery attempts where it may have a false positive and leave the service offline or otherwise make assumptions which could have damaging repurcsusions.

Replies (3)

photo
1

Generally it is advised that you temporarily disable the monitoring for MySQL if you are starting in on something as severe and as manual as a database crash recovery. It is a bit awkward, in my opinion, to expect the service for attempting to get a service back "online" at all costs to make exceptions where it would choose to leave a service "offline".


The advised process:


(1) "WHM -> Service Manager" and uncheck the "Monitor" checkbox for MySQL

(2) Perform your database crash recovery

(3) Go back into WHM and re-check the box to enable monitoring again


This would guarantee cPanel & WHM will not attempt to get MySQL back online while you perform your maintenance.


However, I do welcome further feedback and comments on this feature request to gauge customer interest. I am concerned with any situation where you're asking chkservd to willingly leave a service offline. It opens the potential for false positives and therefore chkservd leaving your service online until you or your customers notice.


It seems more reasonable for a rare manual action (crash recovery) to expect a manual action (disabling monitoring for MySQL), versus attempting to automate chkservd to recognize and ignore crash recovery attempts where it may have a false positive and leave the service offline or otherwise make assumptions which could have damaging repurcsusions.

photo
2

Thanks


In our case MySQL restarted automatically and started a crash recover automatically. Yes chksrvd did not allow it to finish before restarting. This all happened before we got to it.


May be chksrvd should also check either the logs or processes for a recent restart and give it longer to startup if necessary.

photo
2

I believe it would not be too hard for this to be solved. Simply by checking the mysql error log and observing whether a crash recovery had started in the last 15 minutes, then it should be assumed it is in the process of recovering and not attempt to start another process.

Leave a Comment
 
Attach a file