Re: CGIs with MacOS 9.1 - problem
Re: CGIs with MacOS 9.1 - problem
- Subject: Re: CGIs with MacOS 9.1 - problem
- From: cris <email@hidden>
- Date: Fri, 13 Apr 2001 20:13:00 +0200
on 13.04.2001 5:07 Uhr, Jeffrey W Baumann at email@hidden wrote:
(...)
>
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.
I see.
>
> 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.
Only a suggestion in case you let quit the CGI immediately. As i started
with CGI's i has the same problem with "document contains no data", and i
think i "solved" it with delays (before i leave them running all the time).
But that is about 2 years ago, so i might remember it wrong..
>
>> 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.
Hm, my server is running W* 4.3, OS 9.1, AS 1.6. But my CGI's do also
properly respond when they are not already running.
OK, i played now a bit with my cgis (thanks to Timbuktu):
When you call a cgi, it first executes the run and the idle handler. Do you
have a return statement in the run handler? Is there a difference if you
remove both handlers entirely?
Greetings
cris :-)
--
English is my second language.
www.cooc.de