Re: Cannot start Spyce 2.1-2 web server
Andy Sy <[email protected]> Sat, 02 Sep 2006 12:33:21 +0800
| Newsgroups | gmane.comp.python.spyce.general |
|---|---|
| Message-ID | <[email protected]> |
Jonathan Ellis wrote:
> well, it's clear from the stacktrace that it's a problem with the stdlib
> threading module, so I'm not sure what advice to give here.
>
> you could try starting multiple threads...
>
> from threading import Thread
> from time import sleep
> def foo():
> sleep(10)
> for i in range(10):
> Thread(target=foo).start()
The above was very helpful and I now realize that the problem
most likely has to do with the very limited amount of memory I
have on the VPS I am using (128MB, no swap). I get the 'cannot
start thread' error message when I try to start more than 3-4
threads.
Reducing maxthreads, minthreads to a smaller number gets around
the 'cannot start thread' error message but then I get a 'fork
failed - cannot allocate memory' message. (This is actually a
common message I get on this resource starved VPS.)
I'm able to get the 2.0.3 web server or a minimally configured
Apache to start up fine even with mysqld (also minimally setup
with 8-10MB usage) running in the background whereas even with
mysqld turned off, trying to start the 2.1 webserver fails due
to insufficient memory.
This is what 'top' reports:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 16 0 608 252 460 S 0.0 0.0 0:07.68 init
30384 root 16 0 1456 604 1288 S 0.0 0.0 0:02.40 syslogd
30491 root 16 0 1756 612 1440 S 0.0 0.0 0:02.03 dropbear
30497 root 16 0 1600 632 1436 S 0.0 0.0 0:02.53 crond
1606 root 16 0 2068 1044 1728 R 0.0 0.0 0:00.17 dropbear
5492 root 16 0 2764 1720 2356 S 0.0 0.0 0:00.02 bash
5436 root 16 0 2004 1052 1788 R 0.0 0.0 0:00.01 top
before I try to run spyceCmd.py -l -d, which seems to indicate that
even ~100MB free is not enough to start up the 2.1 web server... ?
Setting minthreads=maxthread=maxqueuesize=1 didn't help.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642