From: Lionel B. <lio...@bo...> - 2004-12-29 09:10:43
|
HaJo Schatz wrote the following on 12/29/04 06:54 : > Lionel Bouton wrote: > >>> - During boot, sqlgrey couldn't access postgresql yet (DBI returned >>> "db is starting up"). >> > >> Retrying after a while is IMHO not worth it (it can't decide on its >> own how much time it has to sleep). SQLgrey must be started after the >> database and this is the administrator's job to configure the system >> accordingly. > > > Sure -- I have an S85psotgresql and a S90sqlgrey. However postgres > seems to take a while to "come up", which makes it currently > impossible to rely on a correct start-up of a box, you have to > intervene manually (and you will still have to if you simply exit > sqlgrey with an error). Currently, a reboot of a box means that you > will not be able to receive any mail afterwards until you attend to it... > > I think there are only two proper ways of solving this: > 1) In above case, DBI is indicating a clear reason why the connection > (temporarily) failed. Hence, if DBI returns "DB starting up" as error, > re-try within sqlgrey until this error is gone. I actually think that > "DB starting up" is not really an error at all... Ok, I'll look into it. > 2) Do this check/delay in the init-script before launching sqlgrey. Ie > query the DB and see whether it's responsive. > > I think 2) is a bit confusing when thinking about what will happen if > the db gets restarted while sqlgrey is already running. I know, in > such a case sqlgrey will re-try. But here's IMHO the inconsistency -- > if there's a DB issue at start-up, sqlgrey ignores it. If the issue > occurs during execution, sqlgrey takes care of it... > I could change that, I believed it would be quite messy to handle the no connection available at startup time but on second thought I think it can be handled cleanly. >> Lionel (back from numerous enjoyable and delicious meals). > > > Hajo, big and round by now. And I thought you went skiing... > Skiing is scheduled on the last 2 weeks of January :-) I hope I'll find some time to hack on SQLgrey before that. Lionel. |