Hi folks!
I just found out about this project from:
http://just-another.net/2009/01/18/byteflowdjangosupervisordnginx-win/#comments
I've been trying to accomplish the same goal, but not using django.
It all *kinda* works, but when I try to curl my fcgi program, I get
nada, and it just hangs forever with no logs... don't know where to
start. I'm using trunk.
Server info:
Python 2.4.3 (#1, Mar 14 2007, 18:51:08)
[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
Here's my config (relevant bits):
--------------------------------------------------
[supervisord]
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=debug ; (log level;default info; others:
debug,warn,trace)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=true ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
minprocs=200 ; (min. avail process descriptors;default 200)
;umask=022 ; (process file creation umask;default 022)
user=nobody ; (default is current user, required if root)
; Production setup
[fcgi-program:gate]
socket=tcp://127.0.0.1:1212 ; We reference this later in nginx
#command = /usr/local/solrflare/bin/gate.py ; Calls the above code
command = /tmp/new.py
environment=PYTHON_EGG_CACHE=/tmp ; Setup needed environment
And here is new.py:
----------------------------------------------
#!/usr/bin/python
from flup.server.fcgi import WSGIServer
import time, os, sys
open('/tmp/new.log','a').write('something')
def app(environ, start_response):
open('/tmp/new.log','a').write('else')
status = "200 OK"
response_headers = [('Content-type', 'text/plain')]
start_response(status, response_headers)
return ['LOALALA\n']
WSGIServer(app).run()
My Log:
-------------------------------------------------
[r...@balancer:/tmp] supervisord
2009-04-06 01:19:01,308 CRIT Set uid to user 99
2009-04-06 01:19:01,500 INFO RPC interface 'supervisor' initialized
2009-04-06 01:19:01,501 INFO RPC interface 'supervisor' initialized
2009-04-06 01:19:01,501 INFO supervisord started with pid 5886
2009-04-06 01:19:02,499 DEBG fd 8 closed, stopped monitoring
<PInputDispatcher at -1216741876 for <Subprocess at -1216915476 with
name gate in state STARTING> (stdin)>
2009-04-06 01:19:02,510 INFO spawned: 'gate' with pid 5888
2009-04-06 01:19:03,508 INFO success: gate entered RUNNING state,
process has stayed up for > than 1 seconds (startsecs)
curl localhost:1212
Just sits there forever...
Help!?
Thanks,
Jacob
--
+1 510 277-0891 (o)
+91 9999 33 7458 (m)
web: http://pajamadesign.com
Skype: pajamadesign
Yahoo: jacobsingh
AIM: jacobsingh
gTalk: [email protected]
_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users