slow CGI with open socket

LiangTyan Fui mlist at afteroffice.com
Mon Mar 25 20:01:01 EST 2002


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...
> 
> 
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard




More information about the metacard mailing list