shacker
shacker

Reputation: 15371

Django: MemoryError from runserver

I'm working on a site that works fine on its existing wsgi server, and fine with runserver in local dev. But now we're preparing to transfer it to a new server and are having trouble getting it to work, even though both servers and setups are close to identical.

In the process of debugging, I tried to fire up runserver on the new server (just for testing purposes of course) and get errors like:

TypeError: must be (memory error), not str

or

  File "/usr/local/lib/python2.7/SocketServer.py", line 225, in serve_forever
    r, w, e = select.select([self], [], [], poll_interval)
MemoryError

Clearly this is related to some kind of memory constraints in the new server environment, but I'm not sure where to go from here. I suspect that if I can clear this up, the wsgi process will start running properly.

Suggestions? Thanks.

Upvotes: 1

Views: 739

Answers (1)

shacker
shacker

Reputation: 15371

This is on a cPanel/WHM server (and we control WHM, i.e. we have root). The answer turned out to be the WHM option "Shell fork bomb protection," which prevents users from running what WHM perceives to be long-running scripts, or scripts that might consume too many resources. Disabling that option restored our ability to use runserver.

Upvotes: 1

Related Questions