List Info

Thread: Re: Threading / Signal problem with cherrypy 3.0.1 / mod_python under Win32?




Re: Threading / Signal problem with cherrypy 3.0.1 / mod_python under Win32?
country flaguser name
United States
2007-05-01 12:20:09
Tim Golden wrote:
> Christian Wyglendowski wrote:
> > On 5/1/07, Tim Golden <tjgoldengmail.com> wrote:
> >> A perusal of the _cpengine module docstrings
suggested that
> >> setting the SIGHUP/SIGTERM class attributes to
None would
> >> turn off signal handling seems to have done
the trick (at
> >> least so far as this). I added:
> >>
> >> cherrypy._cpengine.Engine.SIGHUP = None
> >> cherrypy._cpengine.Engine.SIGTERM = None
> >> cherrypy._cpengine.Engine.autoreload_on =
False
> >>
> >> to the top of my code and it gets past the
error... and
> >> on to a more sedate cherrypy error (404 -
"The path /app
> >> was not found") which I'm better placed
to handle.
> >>
> >> If there are other/better solutions that what
I've
> >> proposed here, please feel free to educate
me!
> > 
> > That sounds like the right way to handle it.  One
thing though: you
> > can simply reference cherrypy.engine rather than
> > cherrypy._cpengine.Engine.
> 
> Wasn't sure about that; thanks for clarifying. I'm a
little
> confused; am I the first person to experience this? Is
there
> something unusual in my setup that doesn't occur
elsewhere?
> (Win32 perhaps?). I'm happy to provide a doc patch, but
best
> not if it's some localised condition no-one else will
meet.

You're not the first; a doc patch would be most welcome.


> > Christian
> > http://www.dowski.com
> > 
> > ps
> > Back when I was sysadmin for a largely
Windows-based datacenter I
> > found your WMI tools very useful!
> 
> Hey! Thanks for that. I don't feel so bad about
soaking
> up your cherrypy expertise now 

I found your AD work and misc win32 howtos quite beneficial,
too.
Thanks!


Robert Brewer
System Architect
Amor Ministries
fumanchuamor.org

--~--~---------~--~----~------------~-------~--~----~
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: Threading / Signal problem with cherrypy 3.0.1 / mod_python under Win32?
country flaguser name
United States
2007-05-01 14:19:26
[Tim Golden]
>> Wasn't sure about that; thanks for clarifying. I'm
a little
>> confused; am I the first person to experience this?
Is there
>> something unusual in my setup that doesn't occur
elsewhere?
>> (Win32 perhaps?). I'm happy to provide a doc patch,
but best
>> not if it's some localised condition no-one else
will meet.

[Robert Brewer]
> You're not the first; a doc patch would be most
welcome. 

Happy to oblige. The only thing is: I'm not sure what
I'm patching - the docstring? one of the several wiki
pages? And the only *other* thing (!) is that I'm not
sure what I'm documenting. See: tons of goodwill; not
many clues.

In short, I can happily provide text which says:

"""
Possible problem using mod_python:
If you encounter "Unrecoverable error in the
server"
or, with logging turned on, an error which seems
related to threads and signals, then try adding
the following lines to your cherrypy module before
the engine is initialised:

cherrypy.engine.SIGHUP = None
cherrypy.engine.SIGTERM = None
"""

(in fact - there it is) and this would at least save
someone in the future from having to sweat a few hours
of trial-and-error. But is there some deeper malaise?
Should the CP engine be *trying* to send signals when
not in the main thread? What's the impact of turning
the signals off?

[Robert B]
> I found your AD work and misc win32 howtos quite
beneficial, too.
> Thanks!

Glad to be of service  I'm
certainly glad that
cherrypy's around - isn't the Python community great?!

TJG

--~--~---------~--~----~------------~-------~--~----~
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-2]

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