web2py rocket error on vps

82 views
Skip to first unread message

Johan

unread,
Jul 30, 2010, 12:41:03 PM7/30/10
to web2py-users
Hello. I'm new here.
I just bought a vps at intovps.com , I installed archlinux on it with
everything that I'm used to work with, and tried launching web2py, but
to no avail.

$ python web2py.py --nogui --password="a" --port="55000"

web2py Enterprise Web Framework
Created by Massimo Di Pierro, Copyright 2007-2010
Version 1.81.5 (2010-07-22 17:51:19)
Database drivers available: SQLite3, PostgreSQL
Starting hardcron...
please visit:
http://127.0.0.1:55000
use "kill -SIGTERM 24238" to shutdown the web2py server
Traceback (most recent call last):
File "web2py.py", line 20, in <module>
gluon.widget.start(cron=True)
File "/home/johan/web2py/gluon/widget.py", line 875, in start
server.start()
File "/home/johan/web2py/gluon/main.py", line 683, in start
self.server.start()
File "/home/johan/web2py/gluon/rocket.py", line 208, in start
self._threadpool.start()
File "/home/johan/web2py/gluon/rocket.py", line 547, in start
thread.start()
File "/usr/lib/python2.6/threading.py", line 474, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread


It seems that there is a problem with threads on the python
installation.
But I ran a simple threading test and it worked....
Any ideas?

mdipierro

unread,
Jul 31, 2010, 4:00:57 AM7/31/10
to web2py-users
which python version?

Johan

unread,
Jul 31, 2010, 4:20:04 AM7/31/10
to web2py-users
I'm using python 2.6.5

mdipierro

unread,
Jul 31, 2010, 4:27:26 AM7/31/10
to web2py-users
Can you try with the -N option?

Johan

unread,
Jul 31, 2010, 4:49:57 AM7/31/10
to web2py-users
I tried with -N 1, 2, 3, etc., same error message.

On a side note: I configured web2py to work with apache and mod_wsgi,
it works , but I noticed an exception in the apache error_log

[error] Exception KeyError: KeyError(-1211209984,) in <module
'threading' from '/usr/lib/python2.6/threading.pyc'> ignored

It doesn't seem to affect web2py, but I'm not sure that it won't cause
a problem in the future.
It may be related to the problem above.

mdipierro

unread,
Jul 31, 2010, 5:18:05 AM7/31/10
to web2py-users
I have never seen this before but it seems something is wrong in the
threading module in python 2.6.5.
Has anybody else seen this with other Python versions?

Graham Dumpleton

unread,
Jul 31, 2010, 6:47:48 AM7/31/10
to web2py-users
Did you actually try Googling for it?

Python 2.6.5 and 3.1.2 (???) made a change to C api behaviour.

The message is harmless all the same.

Upgrade to mod_wsgi 3.3 where the message has been suppressed.

Go read ticket 197 on mod_wsgi site and read mod_wsgi release notes
for version 3.3.

Graham
> > > > > > Version1.81.5(2010-07-22 17:51:19)

mdipierro

unread,
Jul 31, 2010, 6:56:13 AM7/31/10
to web2py-users
Good to know. Thanks Graham.

Massimo

On Jul 31, 5:47 am, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:

Cody M

unread,
Dec 22, 2011, 10:28:19 PM12/22/11
to web...@googlegroups.com
I'm getting this error with the latest version of web2py as well. Which is
confusing, since all the web2py's I've used before the most recent version has
worked fine.


Unyo

unread,
Mar 25, 2012, 5:39:47 PM3/25/12
to web...@googlegroups.com
I finally figured out why this is happens. If you have a small VPN like i do (tinyvpn on ipxcore, 96MB ram), the thread size (8MB) will cause a very small amount of threads to be allowed. 

To fix this, enter the command below:

ulimit -s 1024


Related error message:

File "/usr/lib/python2.6/threading.py", line 474, in start
    _start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread

Hope this helps someone in the future trying to run this great web framework on a minimal server!
Reply all
Reply to author
Forward
0 new messages