Startup fails due to hard-coded timeout in init script
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Medium
|
Tomislav Plavcic | ||
5.1 |
Won't Fix
|
Undecided
|
Unassigned | ||
5.5 |
Fix Released
|
Medium
|
Tomislav Plavcic | ||
5.6 |
Fix Released
|
Medium
|
Tomislav Plavcic |
Bug Description
/etc/init.d/mysql now has a hard-coded startup timeout of 10 seconds. Previously it was 14 seconds, which was also too short for our configuration.
Our my.cnf contains:
innodb_
MySQL takes around 15 seconds to start on this server with this option in place. After waiting 10 seconds, the init script reports that startup failed:
* Starting MySQL (Percona Server) database server mysqld [fail]
But in fact mysqld is running and responsive a few seconds later. The guilty code is in /etc/init.d/mysql:
# wait 10sec before start checking if pid file created or server is dead
if [ $dead_check_counter -lt 10 ]; then
If I remove "innodb_
* Starting MySQL (Percona Server) database server mysqld [ OK ]
However we need this option, so we are currently working around this by changing the guilty code in the init script to:
# wait 60sec before start checking if pid file created or server is dead
if [ $dead_check_counter -lt 60 ]; then
This problem has been discussed before in bugs #1072538 and #1328262. Both of these bugs were reported fixed in 5.6.22-71, but it seems to have worked its way back to the current version in a slightly altered form.
Bug #1328262 mentions a configurable timeout using a value in /etc/default/mysql. I think this is probably the best solution, since as Vladimir mentions, "whatever value you hardcode won't cut it for edge cases".
tags: | added: pkg |
Changed in percona-server: | |
assignee: | nobody → Tomislav Plavcic (tplavcic) |
10sec here should be only for server pid to show up not for the full server to start, when pid show's up then it waits unlimited time for server to become pingable.
Need to check that part maybe there's something wrong with it.