Re: concurrent connections and multiple accepts
Barclay Curtis <barclay.curtis-oQjRbAq6OkS2oZ/[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks Tim.. I don't think I have a clear picture of things yet tho..... > FCGI provides for multiple concurrent instances of the FCGI app., adding processes as load goes up Do I have to code something specific to get fast cgi to add processes? Currently: If I have only one instance (child) of my FCGI appserver running (so effectively one fcgi external server) and I look at page A on my site which has a 20 second sleep in it. Then I look at page B (which is just a normal kinda page, no delays). Page B wont load until page A has finished. Does this not mean that they are using the same process? How does FCGI determine when it needs to add a new process? I start my FCGI server by running the script fcgiserver.pl When you say it adds new processes, does this mean that i would have 2 fcgiserver.pl script running? Or am I getting totally the wrong end of the stick? Cheers Tim Wood wrote: >At 06:21 AM 06/16/05, you wrote: > > >>Hi >> >>We run an 'appserver' which is written in perl and basically fork some children and manages them. >>Each child is a FCGI application, which does >>$request = FCGI::Request(\*STDIN, \*STDOUT, \*STDERR, \%ENV, $socket, 0) >> >>and then loops on >>$request->Accept >> >>in the same way all the FCGI examples do. ... >> >> > >This is the first red flag. It seems you're doing a lot of extra work to redo the FCGI process structure incorrectly. FCGI provides for multiple concurrent instances of the FCGI app., adding processes as load goes up and killing off extra ones when things quiet down. So it's not clear you need the forking logic, etc. as that's what the FCGI process manager does. Note that an FCGI can still fork its own subprocesses to handle tasks for the current invocation, but there's no need to get into managing the FCGI processes themselves. >HTH, >TW > > > > -- Barclay Curtis Senior Developer Nexus Media Communications Ltd Media House, Azalea Drive, Swanley, Kent BR8 8HY _____________________________________________ +44 (0) 1322 611460 www.nexusmedia.co.uk ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/