PostgreSQL backend: a waste of time?

Mika Iisakkila mika.iisakkila at pingrid.fi
Tue Nov 26 08:38:06 EST 2002


Nicola Ranaldo wrote:

>  in imapd.c I read:
>
> /*
>  * run once when process is forked;
>  * MUST NOT exit directly; must return with non-zero error code
>  */
> int service_init(int argc, char **argv, char **envp)
>
> but mboxlist_init() is a void! it calls directly fatal() and so exit().
>
> Master will not check exit code of its children and so does not reset the
> number of ready workers, so if another connection arrives no process will
> serve it!
> So if PostgreSQL goes down i have to restart cyrus!
>
> I know how to patch this in master.c but in case of fatal error, it will
> bring up a huge number of sequential forks until PostgreSQL is available
> again. So other changes will be necessary, but i think that's not up to me.


I believe this might be the problem that sometimes causes a given service to
disappear and not come up until master is restarted. An almost sure way to
trigger this is to pound Cyrus until the OS runs out of file descriptors.

As to your question in the subject, certainly not. All of the available
backends seem to have their shortcomings, so it's nice to have options
when something blows in a given environment...

--mika





More information about the Info-cyrus mailing list