On Tue, Feb 2, 2010 at 5:49 PM, Naftoli Gugenheim <naftoli...@gmail.com>wrote:

> Hmm... Can the code catch the exception and try to execute a script that
> restarts it? :)


The Sun JVM has the following flag:

 -XX:OnOutOfMemoryError="script_to_execute"

This will allow an auto-restart.


>
>
> On Tue, Feb 2, 2010 at 8:43 PM, Jim Barrows <jim.barr...@gmail.com> wrote:
>
>> Not generally within your code no.  The VM is out of memory, not the
>> webapp, so the VM has to be restarted.  However you could have a nagios
>> other monitoring service auto-restart in such cases.
>> On the other hand... you really shouldn't be getting a OOM error in
>> Java.......
>>
>> On Tue, Feb 2, 2010 at 5:17 PM, Naftoli Gugenheim 
>> <naftoli...@gmail.com>wrote:
>>
>>> Is there any way to have a webapp handle an out of memory exception
>>> semi-gracefully? E.g., release session, restart, something other than having
>>> to ssh into the server?
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Lift" group.
>>> To post to this group, send email to lift...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/liftweb?hl=en.
>>>
>>>
>>
>>
>> --
>> James A Barrows
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Lift" group.
>> To post to this group, send email to lift...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/liftweb?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to