Re: CGIs with MacOS 9.1 - problem
Re: CGIs with MacOS 9.1 - problem
- Subject: Re: CGIs with MacOS 9.1 - problem
- From: Jeffrey W Baumann <email@hidden>
- Date: Thu, 12 Apr 2001 22:07:41 -0500
Disclaimer: This is the first email to the list I am sending from the
MacOSX Mail client (gotta love that email address I grabbed last
year : )
On Thursday, April 12, 2001, at 04:11 PM, cris wrote:
on 12.04.2001 18:40 Uhr, email@hidden at email@hidden wrote:
I've got a serious problem. I upgraded my server to MacOS 9.1 last
nite, and
now all my CGIs will not work ("document contains no data") unless
they are
permanently left open (achieved by removing the idle handlers which
closed
them after 15 minutes). It's as if WebSTAR isn't giving them the script
enough time to run (they ran very quickly, under a second, with 9.04/AS
1.4.3).
If it's working when you remove the idle handler then you must have a
quit
statement in it!?
I wasn't clear. The problem is that if the CGI script is not already
running, it returns no data, even though it starts when called by
WebSTAR. The (hopefully temporary) solution is to leave them running all
the time (no idle handler to time a quit, and put them in the startup
items folder). The presence of a quit command in the idle handler is not
the issue; if the CGI is already running, even with the idle handler, it
works fine.
Anyway, you might experiment with delays after your 'handle cgi'
handler but
i wouldn't recommend that, the better way is to run the CGI's
continuously.
I'm not sure why a delay after the handle CGI request would help.
The problem is that a script that is used only once a day now takes up
permanent residence in RAM, gobbling it up (I have many scripts).
I have about 15 scripts on the server running (not all CGI's). Beside
few MB
of RAM it is absolutely no disadvantage with this. The servers
performance
is not affected by idling scripts. And if you put 'return 86400' or
something like that into the idle handler it's very very very little cpu
usage no matter on what computer the things do run.
You can monitor the usage of RAM and the CPU with Peek-a-Boo for example
(search on versiontracker.com for it).
I'm not concerned about the CPU usage. Actually, I welcome the marginal
improved responsiveness caused by having the scripts always running. My
concern is the RAM footprint. My server has 192 MB (as recently as 16
months ago I thought that would be plenty!). WebSTAR takes 98 MB, the OS
takes 38, and my Applescript database takes 16. That leaves 40 MB. I
need to keep about 30 MB free for WebSTAR Mail to work properly (RAM
hog), and most of my scripts are allocated 768K (yes, they really need
that much). Suddenly, my RAM footprint is full, with no room for growth.
I had planned to outgrow this server bythe end of the year, but they may
come sooner than I want.
But the greater issue is, why has the behavior of CGIs changed from Web*
4.2/MacOS 9.04/AS 1.3.7 (yes, the AS components from 8.6) to WebSTAR
4.4/MacOS 9.1/AS 1.6? I smell a bug that needs fixing. If I need to, I
will try and go back to AS 1.3.7.
Jeff Baumann
email@hidden / email@hidden (dual citizenship!)
www.linkedresources.com