[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

.acgi considered harmful (Was: [MacPerl] Error type 12)



Joel Rees replied:

>I was hoping Chris or Jack or someone with more Perl-specific experience
>would hop in on this one first. I don't have much Perl-specific
>experience.
>
>>Hi!  I've created a (very large) .acgi for the place I work.  I'm having
>>a big problem with every so often, MacPerl crashes with an error type
> >12.

Sorry, I missed the original post somehow, and I am jumping in to the 
middle, but if I understand this issue I have been through this hell 
and would warn the original poster away:

Don't use the .acgi extension for MacPerl scripts on a real web server!

Here's why:

The .acgi suffix is used to signal WebSTAR (and probably other web 
servers) that the cgi can service multiple hits simultaneously.

MacPerl is not multi-threaded.

If you use the .cgi suffix, overlapping hits to the same or different 
MacPerl cgi's will be handled serially.

If you use the .acgi suffix, overlapping hits can be dropped or can 
crash your Mac, depending on factors that I have not defined.

The MacPerl cgi glue uses the .acgi extension to signal that "server 
push" should be allowed, that is, that the web server should return 
data from the cgi to the client as it comes in rather than all at 
once.  This is a useful feature, but unfortunately has the 
side-effect noted above.

With AppleScript, .acgi is a NOOP.  With Frontier, it works as 
intended.  With MacPerl, it both implements an unrelated feature but 
also makes the cgi unstable under load.

-David Steffen-
David Steffen, Ph.D.
President, Biomedical Computing, Inc. <http://www.biomedcomp.com/>
Phone: (713) 610-9770 FAX: (713) 610-9769 E-mail: steffen@biomedcomp.com

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org