Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #2731

Re: Sandboxed Python: memory limits?

References <mailman.62.1302055157.9059.python-list@python.org> <inij0j$v6v$1@online.de> <BANLkTimr8KhzbT4SGVY_9wbp24h46LGPMQ@mail.gmail.com>
Date 2011-04-07 10:10 +1000
Subject Re: Sandboxed Python: memory limits?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.92.1302135041.9059.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Apr 7, 2011 at 10:06 AM, Chris Angelico <rosuav@gmail.com> wrote:
> I'm not too concerned about extensions, here; in any case, I lock most
> of them off. I just want to prevent stupid stuff like this:
>
> a='a'
> while True:
>    a+=a
>
> from bringing the entire node to its knees. Obviously that will
> eventually bomb with MemoryError, but I'd rather it be some time
> *before* the poor computer starts thrashing virtual memory.

To clarify: One node will be hosting multiple clients' code, and if it
runs out of physical memory, performance for everyone else will be
severely impacted. So I'm hoping to restrict the script's ability to
consume all of memory, without (preferably) ulimit/rlimiting the
entire process (which does other things as well). But if it can't be,
it can't be.

Chris Angelico

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Sandboxed Python: memory limits? Chris Angelico <rosuav@gmail.com> - 2011-04-06 11:59 +1000
  Re: Sandboxed Python: memory limits? "Martin v. Loewis" <martin@v.loewis.de> - 2011-04-06 22:38 +0200
    Re: Sandboxed Python: memory limits? Chris Angelico <rosuav@gmail.com> - 2011-04-07 10:06 +1000
      Re: Sandboxed Python: memory limits? "Martin v. Loewis" <martin@v.loewis.de> - 2011-04-07 10:01 +0200
      Re: Sandboxed Python: memory limits? "Martin v. Loewis" <martin@v.loewis.de> - 2011-04-07 10:01 +0200
    Re: Sandboxed Python: memory limits? Chris Angelico <rosuav@gmail.com> - 2011-04-07 10:10 +1000
      Re: Sandboxed Python: memory limits? David Bolen <db3l.net@gmail.com> - 2011-04-07 14:36 -0400
        Re: Sandboxed Python: memory limits? Chris Angelico <rosuav@gmail.com> - 2011-04-08 04:59 +1000

csiph-web