in reply to Re: Simple (but robust) email server (receiver)
in thread Simple (but robust) email server (receiver)
Thanks - it looks interesting. One question about the plugins - how do you maintain a database connection persistent for a worker process? The docs only say:
There is no restriction, what you can do in “register()”, but creating database connections and reuse them later in the process may not be a good idea. This initialisation happens before any “fork()” is done. Therefore the file handle will be shared by all qpsmtpd processes and the database will probably be confused if several different queries arrive on the same file handle at the same time (and you may get the wrong answer, if any).So is there a way to initialize the connection just after the fork - and before any request is served?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Simple (but robust) email server (receiver)
by skx (Parson) on Dec 17, 2008 at 19:23 UTC |
In Section
Seekers of Perl Wisdom