drbob / djrs

Django based Web Interface to Retroshare
29 stars 4 forks source link

run.sh: ensure runfcgi mode spawns at most one process #2

Closed alexeicolin closed 11 years ago

alexeicolin commented 11 years ago

I needed to do this to run.sh to get it working: python manage.py runfcgi host=127.0.0.1 port=8080 daemonize=false \ maxchildren=1 maxspare=1

Note that maxchildren instead of max_children (probably, a typo). Without the maxspare it still spawned several processes. Without restricting the spawned processes, the global harness singleton ends up not being a singleton, which breaks sessions.

drbob commented 11 years ago

okay, sure. I normally use Tornado or the devserver, so thanks for testing it. Send me Pull Request and I'll patch it.

I've started working on a "multi_session" branch which allows multiple sessions in parallel. At the moment, it too is limited to a single process webserver. But it should be able to support a multi-threaded webserver (like Tornado).

I've been told it should be possible to make it work across multiple processes, by mimicking the way the dbase connections are handled... i.e. a Pool of SSH Objects.

drbob commented 11 years ago

Thanks for the patch, sorry it took so long to merge.