List Info

Thread: CherryPy process cannot be stopped by FastCGI




CherryPy process cannot be stopped by FastCGI
country flaguser name
United States
2007-09-18 23:56:21
Hello, everyone:

I have configured to use CherryPy with Apache 2.2.4 by
FastCGI. But
there's one problem, that is when I stopped the apache
server with
`apachectl stop', the cherrypy script started by fastcgi is
still
running, I have to manually stop them. Is there anybody can
help me
out?

The related configuration in httpd.conf is below:

FastCgiIpcDir /tmp
FastCgiServer /Users/xxx/Sites/fcgi/test.py -idle-timeout
120 -
processes 4
<Directory /Users/xxx/Sites/fcgi>
    SetHandler fastcgi-script
</Directory>
ScriptAlias /test /Users/xxx/Sites/fcgi/test.py

Thanks a lot.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: CherryPy process cannot be stopped by FastCGI
country flaguser name
United States
2007-09-19 09:25:45
I know the reason now. Fastcgi process manager sends TERM
signal to
WSGI server (cp script), but the signal is not handled by
the cp
script. I'm trying to find out how to handle the signal
properly.

On Sep 19, 12:56 pm, gcn <gaochong...gmail.com> wrote:
> Hello, everyone:
>
> I have configured to use CherryPy with Apache 2.2.4 by
FastCGI. But
> there's one problem, that is when I stopped the apache
server with
> `apachectl stop', the cherrypy script started by
fastcgi is still
> running, I have to manually stop them. Is there anybody
can help me
> out?
>
> The related configuration in httpd.conf is below:
>
> FastCgiIpcDir /tmp
> FastCgiServer /Users/xxx/Sites/fcgi/test.py
-idle-timeout 120 -
> processes 4
> <Directory /Users/xxx/Sites/fcgi>
>     SetHandler fastcgi-script
> </Directory>
> ScriptAlias /test /Users/xxx/Sites/fcgi/test.py
>
> Thanks a lot.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: CherryPy process cannot be stopped by FastCGI
user name
2007-09-19 11:11:36
On 9/19/07, gcn <gaochongnangmail.com> wrote:
>
> I know the reason now. Fastcgi process manager sends
TERM signal to
> WSGI server (cp script), but the signal is not handled
by the cp
> script. I'm trying to find out how to handle the signal
properly.

If you are using CP 3.0.1, there was a bug that kept TERM
from being
handled correctly.  3.0.2 corrects that issue.  Here is the
ticket:
http://cherrypy.org/ti
cket/667

Christian
http://www.dowski.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: CherryPy process cannot be stopped by FastCGI
country flaguser name
United States
2007-09-19 23:31:00
I'm using CP 3.0.2. While CP script is running as a
standalone HTTP
server, it handles TERM signal well, but it seems that it
ignores the
TERM signal whiling running as a WSGI server. Is there
anything I
missed? some related code is listed below:

# init cp
app = cherrypy.tree.mount(HelloWorld(), "/test",
config="conf")
cherrypy.engine.start(blocking=False)

# use flup to start wsgi server
from flup.server.fcgi import WSGIServer
WSGIServer(app).run()

On Sep 20, 12:11 am, "Christian Wyglendowski"
<christ...dowski.com>
wrote:
> On 9/19/07, gcn <gaochong...gmail.com> wrote:
>
>
>
> > I know the reason now. Fastcgi process manager
sends TERM signal to
> > WSGI server (cp script), but the signal is not
handled by the cp
> > script. I'm trying to find out how to handle the
signal properly.
>
> If you are using CP 3.0.1, there was a bug that kept
TERM from being
> handled correctly.  3.0.2 corrects that issue.  Here is
the ticket:http://cherrypy.org/ti
cket/667
>
> Christianhttp://www.dowski.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: CherryPy process cannot be stopped by FastCGI
user name
2007-09-20 07:56:41
On 9/20/07, gcn <gaochongnangmail.com> wrote:
>
> I'm using CP 3.0.2. While CP script is running as a
standalone HTTP
> server, it handles TERM signal well, but it seems that
it ignores the
> TERM signal whiling running as a WSGI server. Is there
anything I
> missed? some related code is listed below:
>
> # init cp
> app = cherrypy.tree.mount(HelloWorld(),
"/test", config="conf")
> cherrypy.engine.start(blocking=False)
>
> # use flup to start wsgi server
> from flup.server.fcgi import WSGIServer
> WSGIServer(app).run()

Ah, perhaps the problem is with the flup WSGIServer?  Maybe
you should
see how it handles SIGTERM*, if at all?

Christian
http://www.dowski.com

* Here is a case where Robert's (CP lead dev) proposal for a
standard
web "bus" would come in handy.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )