[Bug 273938] New: mysql init script improvements
https://bugzilla.novell.com/show_bug.cgi?id=273938 Summary: mysql init script improvements Product: openSUSE 10.2 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: mmarek@novell.com ReportedBy: poeml@novell.com QAContact: qa@suse.de Hi Michal, I have a few suggestions for the mysqld init script: 1) The datadir is hardcoded (while the init script is not marked noreplace) 2) The script waits 10 seconds on startup: for((i=0; i<50; i++)); do sleep 0.2 test -S $socket && i='' && break done test -z "$i" || rc_failed This can be too short, a database with innodb tables of a few gigabytes size can take longer to start up. I would suggest to increase the time to 30 or 60 seconds. And after such a long time, it can probably be assumed that start was _not_ failed, if the socket is still not there, but the mysqld is running. 3) It would be good to wait at stop time, because it can take considerable time to flush buffers to disk after the stop is signalled. (I'm running a large database with a configuration without immediate log flushing for performance reasons) Also because a restart might fail if the start is attempted before mysqld has quit. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=273938 mmarek@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |poeml@novell.com ------- Comment #1 from mmarek@novell.com 2007-05-15 02:10 MST ------- (In reply to comment #0)
1) The datadir is hardcoded (while the init script is not marked noreplace)
It *should* read the config from /etc/my.cnf (see parse_arguments function), but might be that it doesn't work, I'll check ;-)
2) The script waits 10 seconds on startup:
for((i=0; i<50; i++)); do sleep 0.2 test -S $socket && i='' && break done
test -z "$i" || rc_failed
This can be too short, a database with innodb tables of a few gigabytes size can take longer to start up. I would suggest to increase the time to 30 or 60 seconds. And after such a long time, it can probably be assumed that start was _not_ failed, if the socket is still not there, but the mysqld is running.
OK, good point. Just in the update case I really need the socket to run mysql_upgrade.
3) It would be good to wait at stop time, because it can take considerable time to flush buffers to disk after the stop is signalled. (I'm running a large database with a configuration without immediate log flushing for performance reasons)
Also because a restart might fail if the start is attempted before mysqld has quit.
In 10.2 it does wait a minute or so, see bug 223209, do you think the timeout should be higher? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=273938 poeml@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|poeml@novell.com | ------- Comment #2 from poeml@novell.com 2007-05-15 07:08 MST -------
1)
It *should* read the config from /etc/my.cnf (see parse_arguments function), but might be that it doesn't work, I'll check ;-)
I didn't check. If it does, it was not obvious to me. I just saw that there is the hardcoded line right at the beginning, and I didn't see an obvious place where it is changed later. And there is no /etc/sysconfig/mysqld.
3)
In 10.2 it does wait a minute or so, see bug 223209, do you think the timeout should be higher?
I am actually on SLES10 -- I didn't check 10.2 or Factory. SLES10 uses killproc... but if I understood bug 223209 correctly you already submitted an update for SP1... I would give at least a minute or two to shutdown cleanly. It's probably useful if a hanging mysqld can't prevent the shutdown completely, but usually you are still logged in via ssh when the shutdown hangs, so could intervene. BTW, does killproc -t option not help here? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=273938 mmarek@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #3 from mmarek@novell.com 2007-05-28 02:43 MST ------- I increased the start timeout and made it non-fatal (except when mysql_upgrade needs to be run). Please reopen if you have more suggestions. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com