Bug #26952 mysql.server needs to be able to not timeout in certain situations
Submitted: 8 Mar 2007 7:10 Modified: 19 Jun 2007 0:38
Reporter: Monty Taylor Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version: OS:Linux (linux)
Assigned to: Monty Taylor CPU Architecture:Any

[8 Mar 2007 7:10] Monty Taylor
Description:
When being started by Heartbeat, it is important that the mysql init script only return an error when mysqld actually fails to start. If InnoDB has crashed under high load, it is possible for startup to legitimately take longer than 900 seconds. In this case, the init script will exit with a failure message, and heartbeat will erroneously think there is a problem. 

How to repeat:
crash mysql under high load and then start it. 

Suggested fix:
Add an optional config variable to the [mysql.server] section of my.cnf called service_startup_timeout. This variable will default to 900, the current timeout. It is measured in seconds. When this variable is set to 0, the init script will not timeout and will wait indefinitely.
[13 Mar 2007 13:06] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/21807

ChangeSet@1.2472, 2007-03-13 06:06:09-07:00, mtaylor@qualinost.(none) +1 -0
  BUG#26952: mysql.server needs to be able to not timeout in certain situations
  
  For systems running MySQL through heartbeat, it is imperitive that the startup scripts 
  not only return correct return values, but do not return until success or failure has been 
  determined. This is a different behavior than is typically wanted for the startup 
  of a normal machine. 
  
  This patch adds support for a timeout variable for mysql.server. Read from my.cnf, this
  variable defaults to 900 (the current default). A value of 0 means not to wait at all for
  startup confirmation. A negative value means to wait forever.
[22 Mar 2007 20:07] Mads Martin Joergensen
Fixed in 5.0.40 and 5.1.17
[19 Jun 2007 0:38] Paul Dubois
Noted in 5.0.40, 5.1.17 changelogs.

Added the --service-startup-timeout option for mysql.server to
specify how long to wait for the server to start. If the server does
not start within the timeout period, mysql.server exits with an
error.

Also updated the mysql.server section to describe this option,
including the meaning of 0 and negative option values.