List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:June 21 2002 7:09pm
Subject:Re: please modify init.d script
View as plain text  
Or better yet,
add a sleep 2 to the beginning of the init.d program you are starting 
that expects to connect to mysql.

Why slow down the booting for everybody when some other daemon that 
expects to connect to mysql
can not handle a failed connect properly?

Florin Andrei wrote:

>The init.d script provided with the MySQL RPMs has a problem: if an
>application depends on MySQL (say, it's a daemon logging some data in
>MySQL), and this application starts right after MySQL, it usually fails.
>
>The reason is, when the init.d/mysql script returs, usually MySQL is not
>fully running, but it's still initializing some stuff. If the other
>application has its init.d script right after, it fails to connect to
>the database, because the database does not run yet. Depending on the
>application, then the application itself might fail to start altogether.
>
>Please add a delay (like "sleep 2" or something like that) to the start
>function in the init.d script. Or modify the start function to not
>return until MySQL has booted up properly. Like:
>
>while [it didn't started yet]; do
>	sleep 1
>done
>


Thread
please modify init.d scriptFlorin Andrei21 Jun
  • Re: please modify init.d scriptGerald Clark21 Jun
    • Re: please modify init.d scriptFlorin Andrei21 Jun
      • Re: please modify init.d scriptThomas Spahni24 Jun