slow CGI with open socket
andu
undo at cloud9.net
Mon Mar 25 04:17:01 EST 2002
LiangTyan Fui wrote:
>
> OK list, here is a problem that I have no answer for the last 2 days.
> I am working on Linux based MetaCard CGI, everything went smoothly by far
> except when I was trying to use "open socket".
> When a "open socket" command is used, the script took unreadably longer time
> to exit, even without any problem. I've tried to run the script under Apache
> as CGI and directly from the shell, both yield the same result.
Same here. The socket actually takes a long time to close for some
reason.
>
> You may cut the following script and save it as your .mt file in your server
> to tryout. Remember to modify the first line of the script to your real MC
> runtime engine.
>
> Thanks.
>
> ------------ script start ---------
> #!/home/mc/mc
>
> on startup
> # any local http server will do, if you have one
> put "www.yahoo.com:80" into thesock
>
> put the long ticks into startTicks
> open socket thesock
> close socket thesock
> put the long ticks - startTicks into ticksTaken
>
> put "Content-Type: text/plain"& crlf & crlf
> put "Ticks taken for this CGI to excute: "& ticksTaken
> end startup
> ------------ script end ---------
>
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
--
____________________
Regards, Andu Novac
More information about the metacard
mailing list