Web: increase subprocess memory limit and catch MemoryError appropriately.

This commit is contained in:
Valentin Lorentz 2015-11-29 18:34:54 +00:00
parent 13c411b741
commit eaf9e40dc2

View File

@ -100,9 +100,9 @@ def fetch_sandbox(f):
def newf(self, irc, *args):
try:
replies = commands.process(process, self, irc, *args,
timeout=10, heap_size=1024*1024,
timeout=10, heap_size=10*1024*1024,
pn=self.name(), cn=f.__name__)
except commands.ProcessTimeoutError:
except commands.ProcessTimeoutError, MemoryError:
raise utils.web.Error(_('Page is too big or the server took '
'too much time to answer the request.'))
else: