Sweet. Glad it worked for you. A release of supervisor should be coming soon.<br><br><a href="http://www.mail-archive.com/supervisor-users@lists.supervisord.org/msg00144.html">http://www.mail-archive.com/supervisor-users@lists.supervisord.org/msg00144.html</a><br>
<br><div class="gmail_quote">On Mon, Apr 6, 2009 at 10:46 PM, Jacob Singh <span dir="ltr"><<a href="mailto:jacobsingh@gmail.com">jacobsingh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Nevermind, I got it figured out.<br>
<br>
Thanks! This is awseome. I hope it gets into a release because my<br>
company is wary of using something that hasn't had a release for a<br>
year.<br>
<div><div></div><div class="h5"><br>
On Tue, Apr 7, 2009 at 11:02 AM, Jacob Singh <<a href="mailto:jacobsingh@gmail.com">jacobsingh@gmail.com</a>> wrote:<br>
> Hmm...<br>
><br>
> okay, I've got it making the request through nginx, however, the<br>
> environ variable is empty in my wsgi script. The same script works<br>
> fine when I create my own named sockets and add them to an nginx<br>
> upstream...<br>
><br>
> Not sure how to proceed on that.<br>
><br>
> Best,<br>
> Jacob<br>
><br>
> On Mon, Apr 6, 2009 at 9:46 PM, Roger Hoover <<a href="mailto:roger.hoover@gmail.com">roger.hoover@gmail.com</a>> wrote:<br>
>> Hi Jacob,<br>
>><br>
>> Your configuration has the FastCGI process listening on <a href="http://127.0.0.1:1212" target="_blank">127.0.0.1:1212</a> so<br>
>> that socket is expecting the client to speak FCGI. If you use curl to send<br>
>> an HTTP request, it won't understand the request. You need to configure a<br>
>> web server such as nginx that will proxy HTTP requests over FastCGI. Nginx<br>
>> will need to run listen on another socket (say 5000) and proxy requests to<br>
>> your FastCGI processes listening on <a href="http://127.0.0.1:1212" target="_blank">127.0.0.1:1212</a>.<br>
>><br>
>> Hope that helps,<br>
>><br>
>> Roger<br>
>><br>
>> On Sun, Apr 5, 2009 at 10:28 PM, Jacob Singh <<a href="mailto:jacobsingh@gmail.com">jacobsingh@gmail.com</a>> wrote:<br>
>>><br>
>>> Hi folks!<br>
>>><br>
>>> I just found out about this project from:<br>
>>><br>
>>> <a href="http://just-another.net/2009/01/18/byteflowdjangosupervisordnginx-win/#comments" target="_blank">http://just-another.net/2009/01/18/byteflowdjangosupervisordnginx-win/#comments</a><br>
>>><br>
>>> I've been trying to accomplish the same goal, but not using django.<br>
>>><br>
>>> It all *kinda* works, but when I try to curl my fcgi program, I get<br>
>>> nada, and it just hangs forever with no logs... don't know where to<br>
>>> start. I'm using trunk.<br>
>>><br>
>>><br>
>>> Server info:<br>
>>> Python 2.4.3 (#1, Mar 14 2007, 18:51:08)<br>
>>> [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2<br>
>>><br>
>>><br>
>>> Here's my config (relevant bits):<br>
>>> --------------------------------------------------<br>
>>> [supervisord]<br>
>>> logfile=/tmp/supervisord.log ; (main log file;default<br>
>>> $CWD/supervisord.log)<br>
>>> logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default<br>
>>> 50MB)<br>
>>> logfile_backups=10 ; (num of main logfile rotation<br>
>>> backups;default 10)<br>
>>> loglevel=debug ; (log level;default info; others:<br>
>>> debug,warn,trace)<br>
>>> pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default<br>
>>> supervisord.pid)<br>
>>> nodaemon=true ; (start in foreground if true;default false)<br>
>>> minfds=1024 ; (min. avail startup file descriptors;default<br>
>>> 1024)<br>
>>> minprocs=200 ; (min. avail process descriptors;default 200)<br>
>>> ;umask=022 ; (process file creation umask;default 022)<br>
>>> user=nobody ; (default is current user, required if root)<br>
>>><br>
>>> ; Production setup<br>
>>> [fcgi-program:gate]<br>
>>> socket=tcp://<a href="http://127.0.0.1:1212" target="_blank">127.0.0.1:1212</a> ; We reference this later in nginx<br>
>>> #command = /usr/local/solrflare/bin/gate.py ; Calls the above code<br>
>>> command = /tmp/new.py<br>
>>> environment=PYTHON_EGG_CACHE=/tmp ; Setup needed environment<br>
>>><br>
>>><br>
>>> And here is new.py:<br>
>>> ----------------------------------------------<br>
>>><br>
>>> #!/usr/bin/python<br>
>>> from flup.server.fcgi import WSGIServer<br>
>>> import time, os, sys<br>
>>><br>
>>> open('/tmp/new.log','a').write('something')<br>
>>> def app(environ, start_response):<br>
>>> open('/tmp/new.log','a').write('else')<br>
>>> status = "200 OK"<br>
>>> response_headers = [('Content-type', 'text/plain')]<br>
>>> start_response(status, response_headers)<br>
>>> return ['LOALALA\n']<br>
>>> WSGIServer(app).run()<br>
>>><br>
>>><br>
>>> My Log:<br>
>>> -------------------------------------------------<br>
>>> [root@balancer:/tmp] supervisord<br>
>>> 2009-04-06 01:19:01,308 CRIT Set uid to user 99<br>
>>> 2009-04-06 01:19:01,500 INFO RPC interface 'supervisor' initialized<br>
>>> 2009-04-06 01:19:01,501 INFO RPC interface 'supervisor' initialized<br>
>>> 2009-04-06 01:19:01,501 INFO supervisord started with pid 5886<br>
>>> 2009-04-06 01:19:02,499 DEBG fd 8 closed, stopped monitoring<br>
>>> <PInputDispatcher at -1216741876 for <Subprocess at -1216915476 with<br>
>>> name gate in state STARTING> (stdin)><br>
>>> 2009-04-06 01:19:02,510 INFO spawned: 'gate' with pid 5888<br>
>>> 2009-04-06 01:19:03,508 INFO success: gate entered RUNNING state,<br>
>>> process has stayed up for > than 1 seconds (startsecs)<br>
>>><br>
>>><br>
>>> curl localhost:1212<br>
>>> Just sits there forever...<br>
>>><br>
>>><br>
>>> Help!?<br>
>>><br>
>>> Thanks,<br>
>>> Jacob<br>
>>><br>
>>><br>
>>> --<br>
>>><br>
>>> +1 510 277-0891 (o)<br>
>>> +91 9999 33 7458 (m)<br>
>>><br>
>>> web: <a href="http://pajamadesign.com" target="_blank">http://pajamadesign.com</a><br>
>>><br>
>>> Skype: pajamadesign<br>
>>> Yahoo: jacobsingh<br>
>>> AIM: jacobsingh<br>
>>> gTalk: <a href="mailto:jacobsingh@gmail.com">jacobsingh@gmail.com</a><br>
>>> _______________________________________________<br>
>>> Supervisor-users mailing list<br>
>>> <a href="mailto:Supervisor-users@lists.supervisord.org">Supervisor-users@lists.supervisord.org</a><br>
>>> <a href="http://lists.supervisord.org/mailman/listinfo/supervisor-users" target="_blank">http://lists.supervisord.org/mailman/listinfo/supervisor-users</a><br>
>><br>
>><br>
><br>
><br>
><br>
> --<br>
><br>
> +1 510 277-0891 (o)<br>
> +91 9999 33 7458 (m)<br>
><br>
> web: <a href="http://pajamadesign.com" target="_blank">http://pajamadesign.com</a><br>
><br>
> Skype: pajamadesign<br>
> Yahoo: jacobsingh<br>
> AIM: jacobsingh<br>
> gTalk: <a href="mailto:jacobsingh@gmail.com">jacobsingh@gmail.com</a><br>
><br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5"><br>
+1 510 277-0891 (o)<br>
+91 9999 33 7458 (m)<br>
<br>
web: <a href="http://pajamadesign.com" target="_blank">http://pajamadesign.com</a><br>
<br>
Skype: pajamadesign<br>
Yahoo: jacobsingh<br>
AIM: jacobsingh<br>
gTalk: <a href="mailto:jacobsingh@gmail.com">jacobsingh@gmail.com</a><br>
</div></div></blockquote></div><br>