Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: IO::Select can_read missing some reads...

by jeffenstein (Hermit)
on Mar 13, 2002 at 18:32 UTC ( [id://151483]=note: print w/replies, xml ) Need Help??


in reply to IO::Select can_read missing some reads...

Ok, so this isn't strictly an answer to your question, as merlyn seems to have done that, but...

Did you know that you can start static fcgi applications with cgi-fcgi? (Comes with mod_fcgi.) You'll just have to give a server and port in the apache config file to point to your app. This lets you start it on a tty and see any startup errors.

You can also point your stderr anywhere you want after the script starts with open STDERR, ">>logfile"; select( (select(STDERR), $|=1)[0]);. This also sets stderr to unbuffered output, but may be superfluous. It might also be helpful to do this after the accept, then close at the end of the loop, so you can move aside large log files.

It's very helpful for daemons / cgi to log everything. This will help to pinpoint problems, and disk space is usually cheaper than programmer time.

Replies are listed 'Best First'.
Re: Re: IO::Select can_read missing some reads...
by suaveant (Parson) on Mar 13, 2002 at 18:40 UTC
    Well... you can also run a fastcgi on the command line... which we do... the problems I refer to are involved more with things like problesm with STDOUT and a strange problem where cgi-fcgi is having problems with our firewall... and packets are getting mangled... I looked at the cgi-fcgi c code... and it was awful...

    End result, it is easier to rewrite FCGI in perl, which also gives us the added bonus of changing the number of availble fastcgi clients on demand, and graceful shutdowns, so they act more like apache... very nice... seems to be coming together nicely...

                    - Ant
                    - Some of my best work - (1 2 3)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://151483]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-20 15:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found