From: HaJo S. <ha...@ha...> - 2004-12-29 05:55:04
|
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... 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... > Lionel (back from numerous enjoyable and delicious meals). Hajo, big and round by now. And I thought you went skiing... -- HaJo Schatz <ha...@ha...> http://www.HaJo.Net PGP-Key: http://www.hajo.net/hajonet/keys/pgpkey_hajo.txt |