Re: Need help with "out of memory Errors" on server script
Re: Need help with "out of memory Errors" on server script
- Subject: Re: Need help with "out of memory Errors" on server script
- From: Jon Pugh <email@hidden>
- Date: Tue, 18 Sep 2001 08:31:58 -0700
At 9:40 AM -0500 9/18/2001, John R. Head wrote:
>
Any other suggestions?
Jon's Commands has a "free memory" command which can be used to determine if you are approaching the breakdown. Then you could use another applet to chain back to yourself, much like a process watcher that restarts things which must stay running.
pseudo code:
-- in leaky app
if free memory < 1000000 then -- a meg?
tell "full path to app restarter"
restart (path to me)
end
quit
end
-- in app restarter, an empty idler
on restart(theApp)
repeat
tell app "finder"
set appRunning to processes whose application file as string = theApp
end
if appRunning then exit repeat
end repeat
tell app "finder"
open theApp
end
quit
end restart
I haven't even compiled this, so figure out the details before trying it.
Good luck.
Jon