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


Groups > comp.lang.python > #2731

Re: Sandboxed Python: memory limits?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.04; 'memory.': 0.05; 'consume': 0.09; 'severely': 0.09; 'this:': 0.11; 'am,': 0.14; 'wrote:': 0.14; 'starts': 0.15; '*before*': 0.16; "clients'": 0.16; 'extensions,': 0.16; 'subject:memory': 0.16; 'stuff': 0.18; 'obviously': 0.20; 'code,': 0.20; '(which': 0.21; 'header:In-Reply-To:1': 0.22; 'thu,': 0.22; 'received:209.85.214.174': 0.23; 'received:mail- iw0-f174.google.com': 0.23; 'restrict': 0.23; 'runs': 0.24; "i'm": 0.26; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; 'subject:?': 0.29; 'be.': 0.29; 'lock': 0.31; 'does': 0.31; "can't": 0.31; 'to:addr:python-list': 0.32; 'things': 0.33; 'hoping': 0.36; 'too': 0.36; 'rather': 0.36; 'case,': 0.36; 'else': 0.37; 'some': 0.37; 'received:209.85': 0.37; 'apr': 0.38; 'be,': 0.38; 'received:google.com': 0.38; 'but': 0.38; 'received:209.85.214': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'hosting': 0.39; 'header:Received:5': 0.40; '2011': 0.62; 'physical': 0.74; 'node': 0.84; 'stupid': 0.84; 'subject:limits': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=4itv03I/JPGKiSUIj9iPHJQaXZr7Hc7x2GfO3MmETkQ=; b=CqvC9ydj2PoQVtD6lZ+761bmnYav73x7mVdgrfcQWFFwa1t3a/9pB4BVZ+N/vIWhGS 6GfZmJ2SGEJCUoVHRs6g1fo8MMYPY69suRwvlsLngIIQTPAJE2L1SguypB37RnMGMkYq 3Ian209ShTdcUz5jvshsp6914YwSDBwI5T3NA=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=PAkkeCA7j2oLrLbN50eXgo0ZD6PIywXwXxxKARzQnCf3g2ACavExptczXbP5whIeDR iWNlrxtLRY8snpDb+BfXYEb9wwM9iscuOEDz3vH3CaUJyZ6PV7svb1KDzX1Zp0B+zk2A 3wKzUmqs9/0sec9/wccefJh7VsdiCNaz6sIOA=
MIME-Version 1.0
In-Reply-To <BANLkTimr8KhzbT4SGVY_9wbp24h46LGPMQ@mail.gmail.com>
References <mailman.62.1302055157.9059.python-list@python.org> <inij0j$v6v$1@online.de> <BANLkTimr8KhzbT4SGVY_9wbp24h46LGPMQ@mail.gmail.com>
Date Thu, 7 Apr 2011 10:10:33 +1000
Subject Re: Sandboxed Python: memory limits?
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.92.1302135041.9059.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 82.94.164.166
X-Trace 1302135041 news.xs4all.nl 41110 [::ffff:82.94.164.166]:51984
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:2731

Show key headers only | 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 | Unroll thread


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