Depending on the web application server you use, this can usually restrict
the memory limit for you - uWSGI is a fine example of this.

You can also use the 'poor mans' memory checks by checking the resident
memory usage (not sure what that func is in Java), and checking if its over
a certain limit.. if it is, then you execute some code. This is a pretty
ghetto approach though ;/

You can also do it externally with a process checker, but again that's
really designed for shared hosting providers to stop abuse and run away
threads.

Hope this helps

Cal

On Wed, Jun 20, 2012 at 5:00 PM, Marcin Tustin <marcin.tus...@gmail.com>wrote:

> Not strictly a django question, but one I hope someone else here might
> have faced.
>
> I have an a site which depends on a java web service (of my own creation).
> This seems to leak memory like a sieve, because of the various libraries
> involved. This is a problem because my host sets a limit on the total usage
> of memory by all of my processes.
>
> *Does anyone here use a tool to monitor memory usage by individual
> processes (or groups thereof), and run commands when certain levels are met?
> * I'd like to kill and restart my java service (through supervisor) when
> it gets above a certain size.
>
> (I know about JVM memory options. These are not really effective for my
> needs).
>
> --
> Marcin Tustin
> Tel: 07773 787 105
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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

Reply via email to