|
|
sybperl-l Archive
Up Prev Next
From: Alex Rolfe <arolfe at MIT dot EDU>
Subject: Re: Sybperl in a fork'ed process?
Date: May 20 1998 4:36PM
Forked connections aren't a good idea. They work sometimes, but they
also give errors sometimes (as you have noted). There are 2 ways around
this problem. One is to open several database connections and give one
to each forked process, such that each process has its own. The other
solution is to have some sort of daemon running in the background to do
this processing that you don't want to wait for.
> BACKGROUND
> I've got a process (a CGI script) which establishes a connection to a
> DB, does some initial processing & DB access to give proper feedback to
> the page viewer. It also has to do some subsequent SQL to update some
> records. I don't want to make the web user wait for the subsequent
> processing to take place, so I fork off a process.
>
> QUESTION
> What's the state of a connection that's been forked?
|