slow CGI with open socket

Pierre Sahores psahores at easynet.fr
Tue Mar 26 18:02:01 EST 2002


LiangTyan Fui wrote:
> 
> On 3/26/02 1:28 AM, Scott Raney wrote:
> 
> <snipped>
> 
> > Works fine here, I get about 0.391975 (though why one would use the
> > long ticks instead of the milliseconds, I don't know ;-)
> 
> Just a HyperCard habit ;-)
> 
> > Note that the CGI itself could take up to 10 seconds to exit because
> > it waits for that socket to time out, though (.mt scripts won't exit
> > while there are open sockets because it doesn't know if maybe some new
> > input is pending for them, and immediately opening and closing a
> > socket could cause it to assume that there is something like that
> > that's supposed to happen).  You won't have this problem if you do
> > some actual work that causes the server to close its socket followed
> > by your app reading until eof on it.  You could also force this clean
> 
> Unfortunately this is not always the case. For example the POP3
> conversation, the server often waits for the client to close the socket,
> even after a "QUIT" command being initiated. And that was where I've stuck.
> 
> > up to occur by calling the openSockets.
> 
> Indeed it works by calling openSockets, the CGI abandon immediately.
> 
> Regards,
> LiangTyan Fui
> 
> > Regards,
> >   Scott
> >
> > ********************************************************
> > Scott Raney  raney at metacard.com  http://www.metacard.com
> > MetaCard: You know, there's an easier way to do that...
> >
> >

Try :

> set the socketTimeoutInterval to "10"

Best Regards, Pierre Sahores

WEB & VPN applications & databases servers
Inspection académique de Seine-Saint-Denis
Qualifier & produire l'avantage compétitif



More information about the metacard mailing list