开发者

Django: MemoryError from runserver

开发者 https://www.devze.com 2023-04-03 18:01 出处:网络
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 w

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 c开发者_运维百科lear this up, the wsgi process will start running properly.

Suggestions? Thanks.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号