Re: [Lift] Handle OOM

2010-02-03 Thread Jeppe Nejsum Madsen
Jim Barrows jim.barr...@gmail.com writes:

 That would require memory allocation etc to do so.  Which is of course, a
 problem at this point.

But you can allocate some baloon memory at startup and free this on
the OOM if you must do some cleanup in the app. I've not used this in a
multi threaded server setting so don't know how well it works there

/Jeppe

-- 
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.



Re: [Lift] Handle OOM

2010-02-03 Thread Jim Barrows
On Tue, Feb 2, 2010 at 9:18 PM, David Pollak
feeder.of.the.be...@gmail.comwrote:



 On Tue, Feb 2, 2010 at 5:49 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:

 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.




Oh, very cool.  I didn't know that.





 On Tue, Feb 2, 2010 at 8:43 PM, Jim Barrows jim.barr...@gmail.comwrote:

 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.comwrote:

 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.comliftweb%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.comliftweb%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.comliftweb%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.comliftweb%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.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Handle OOM

2010-02-03 Thread David Pollak
I've got a work in progress jvm memory options for Lift post... but I've gotta 
get below 30 unread email messages before I finish it (probably late Feb)

Connected by MOTOBLUR™ on T-Mobile

-Original message-
From: Jim Barrows jim.barr...@gmail.com
To: liftweb@googlegroups.com
Sent: Wed, Feb 3, 2010 14:52:47 GMT+00:00
Subject: Re: [Lift] Handle OOM

On Tue, Feb 2, 2010 at 9:18 PM, David Pollak
feeder.of.the.be...@gmail.comwrote:



 On Tue, Feb 2, 2010 at 5:49 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:

 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.




Oh, very cool.  I didn't know that.





 On Tue, Feb 2, 2010 at 8:43 PM, Jim Barrows jim.barr...@gmail.comwrote:

 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.comwrote:

 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.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/grou

-- 
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.



Re: [Lift] Handle OOM

2010-02-03 Thread Naftoli Gugenheim
Looking forward!

-
David Pollakfeeder.of.the.be...@gmail.com wrote:

I've got a work in progress jvm memory options for Lift post... but I've gotta 
get below 30 unread email messages before I finish it (probably late Feb)

Connected by MOTOBLUR™ on T-Mobile

-Original message-
From: Jim Barrows jim.barr...@gmail.com
To: liftweb@googlegroups.com
Sent: Wed, Feb 3, 2010 14:52:47 GMT+00:00
Subject: Re: [Lift] Handle OOM

On Tue, Feb 2, 2010 at 9:18 PM, David Pollak
feeder.of.the.be...@gmail.comwrote:



 On Tue, Feb 2, 2010 at 5:49 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:

 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.




Oh, very cool.  I didn't know that.





 On Tue, Feb 2, 2010 at 8:43 PM, Jim Barrows jim.barr...@gmail.comwrote:

 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.comwrote:

 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.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/grou

-- 
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.

-- 
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.



Re: [Lift] Handle OOM

2010-02-03 Thread Timothy Perrett
+1

JVM flags are like major ninja foo. Cant wait!

Cheers, Tim

On 3 Feb 2010, at 16:12, Naftoli Gugenheim wrote:

 Looking forward!
 
 -
 David Pollakfeeder.of.the.be...@gmail.com wrote:
 
 I've got a work in progress jvm memory options for Lift post... but I've 
 gotta get below 30 unread email messages before I finish it (probably late 
 Feb)
 
 Connected by MOTOBLUR™ on T-Mobile
 
 -Original message-
 From: Jim Barrows jim.barr...@gmail.com
 To: liftweb@googlegroups.com
 Sent: Wed, Feb 3, 2010 14:52:47 GMT+00:00
 Subject: Re: [Lift] Handle OOM
 
 On Tue, Feb 2, 2010 at 9:18 PM, David Pollak
 feeder.of.the.be...@gmail.comwrote:
 
 
 
 On Tue, Feb 2, 2010 at 5:49 PM, Naftoli Gugenheim 
 naftoli...@gmail.comwrote:
 
 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.
 
 
 
 
 Oh, very cool.  I didn't know that.
 
 
 
 
 
 On Tue, Feb 2, 2010 at 8:43 PM, Jim Barrows jim.barr...@gmail.comwrote:
 
 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.comwrote:
 
 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.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/grou
 
 -- 
 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.
 
 -- 
 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.
 
 

-- 
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.



Re: [Lift] Handle OOM

2010-02-03 Thread David Bernard
For in production java app, I generaly wrap them with Java Service
Wrapper for Tanuki Software. (include heartbeat, restart, script to
run as service,...)
http://wrapper.tanukisoftware.org/

or the 100% java alternative : yajsw  http://yajsw.sourceforge.net/

/davidB

On Wed, Feb 3, 2010 at 17:26, Timothy Perrett timo...@getintheloop.eu wrote:
 +1

 JVM flags are like major ninja foo. Cant wait!

 Cheers, Tim

 On 3 Feb 2010, at 16:12, Naftoli Gugenheim wrote:

 Looking forward!

 -
 David Pollakfeeder.of.the.be...@gmail.com wrote:

 I've got a work in progress jvm memory options for Lift post... but I've 
 gotta get below 30 unread email messages before I finish it (probably late 
 Feb)

 Connected by MOTOBLUR™ on T-Mobile

 -Original message-
 From: Jim Barrows jim.barr...@gmail.com
 To: liftweb@googlegroups.com
 Sent: Wed, Feb 3, 2010 14:52:47 GMT+00:00
 Subject: Re: [Lift] Handle OOM

 On Tue, Feb 2, 2010 at 9:18 PM, David Pollak
 feeder.of.the.be...@gmail.comwrote:



 On Tue, Feb 2, 2010 at 5:49 PM, Naftoli Gugenheim 
 naftoli...@gmail.comwrote:

 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.




 Oh, very cool.  I didn't know that.





 On Tue, Feb 2, 2010 at 8:43 PM, Jim Barrows jim.barr...@gmail.comwrote:

 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.comwrote:

 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.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/grou

 --
 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.

 --
 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.



 --
 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.



-- 
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.



[Lift] Handle OOM

2010-02-02 Thread Naftoli Gugenheim
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.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Handle OOM

2010-02-02 Thread Jim Barrows
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.comwrote:

 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.comliftweb%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.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Handle OOM

2010-02-02 Thread Naftoli Gugenheim
Hmm... Can the code catch the exception and try to execute a script that
restarts it? :)

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.comwrote:

 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.comliftweb%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.comliftweb%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.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Handle OOM

2010-02-02 Thread Jim Barrows
That would require memory allocation etc to do so.  Which is of course, a
problem at this point.


On Tue, Feb 2, 2010 at 6:49 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:

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

 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.comwrote:

 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.comliftweb%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.comliftweb%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.comliftweb%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.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Handle OOM

2010-02-02 Thread David Pollak
On Tue, Feb 2, 2010 at 5:49 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:

 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.comwrote:

 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.comliftweb%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.comliftweb%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.comliftweb%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.



Re: [Lift] Handle OOM

2010-02-02 Thread Naftoli Gugenheim
Neat! Thanks!

On Tue, Feb 2, 2010 at 11:18 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Tue, Feb 2, 2010 at 5:49 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:

 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.comwrote:

 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.comwrote:

 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.comliftweb%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.comliftweb%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.comliftweb%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.comliftweb%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.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.