[Twisted-Python] My twisted application could not start after reboot be cause of "twistd.pid"

Glyph Lefkowitz glyph at twistedmatrix.com
Tue Mar 16 11:46:23 EDT 2010

On Mar 16, 2010, at 8:44 AM, Alexandre Quessy wrote:

> Hello everyone,
> 2010/3/16  <exarkun at twistedmatrix.com>:
>> On 07:27 am, tim at commsecure.com.au wrote:
>>> It's possible to add refinements to the basic .pid system, to make it
>>> more resistant to this kind of problem (off the top of my head,
>>> checking
>>> that the named PID exists,
>> Actually it does this already.  But this is a particularly ineffective
>> check, especially for processes launched at boot time, because of the
>> very high possibility of collisions.
> It is possible to retrieve the command line that was used to start a
> process. This would be a simple way to check for matches. The command
> line used to start the twistd process could even be stored as well for
> comparison.

There are many ways to make this more robust; in fact, we already have a ticket open for doing something about this problem: <http://twistedmatrix.com/trac/ticket/3851>.  If you're interested in fixing it, some work there would be helpful.  Even just some comments about different ways this problem can occur and different approaches to solving it would be good, so we can have them all in one place.



More information about the Twisted-Python mailing list