Hi ,
Erik Cederstrand , i just want to limit the memory (maximum heap size for
your process) with in the python application/Service ie in it client Socket
Program.

I found a solution like below

import resource
rsrc = resource.RLIMIT_DATA
soft, hard = resource.getrlimit(rsrc)
resource.setrlimit(rsrc, (1024, hard))
Link :
http://stackoverflow.com/questions/2308091/how-to-limit-python-heap-size

On Tue, Apr 21, 2015 at 1:18 PM, Erik Cederstrand <erik+li...@cederstrand.dk
> wrote:

>
> > Den 21/04/2015 kl. 09.20 skrev SHINTO PETER <shinto....@gmail.com>:
> >
> > Hi
> > François Schiettecatte , limit memory and CPU usage for python socket
> client service
>
> Really, if you want qualified help, you need to be more verbose.
>
> Do you want to kill a process violating your limits? Or can the process be
> expected to cooperate, so you can communicate to a process that it needs to
> cut down on memory usage / CPU? Are these hard limits, or can the process
> use available resources if they are available? Do you want to build some
> sort of accounting, like AWS pay-per-use?
>
> Anyway, this is not really a Django or Python problem. It's a hard problem
> to solve in most operating systems, so you may have better luck asking this
> in a forum related to your operating system.
>
> Erik
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/LE6J4sRujbQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/63B8E65D-E694-4F22-AA89-4732430FD840%40cederstrand.dk
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
SHINTO PETER
NIRAPPIL
09591040010

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKggVnBz7uSVyxvtuj%2BRDhVU_zm_OsjB2o3-BoYVSGd2dt5j-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to