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

Peter Cai newptcai at gmail.com
Tue Mar 16 03:07:09 EDT 2010


I think an init.d script could resolve this problem.
But I am curious about why "turning off power without shutdown twisted
server before" could cause such a problem.

Is it a bug or it has some more fundamental reason?

On Mon, Mar 15, 2010 at 7:07 PM, Marco Giusti <marco.giusti at gmail.com>wrote:

> On Mon, Mar 15, 2010 at 06:32:23PM +0800, Peter Cai wrote:
> > Someone turn off the server by cutting power of the server.
> > When the machine is power on, I found my twisted application could not
> start
> > and emit the following error.
> >
> > Another twistd server is running, PID 3398
> >
> > This could either be a previously started instance of your application or
> a
> > different application entirely. To start a new one, either run it in some
> > other
> > directory, or use the --pidfile and --logfile parameters to avoid
> clashes.
> >
> > After I deleted twistd.pid, it could start normally.
> >
> > I checked if there is process with PID 3398, but there wasn't.
> >
> > What might cause this problem?  How to avoid it?
>
> the problem is caused by turning off power without shutdown twisted
> server before. One solution could be create an init.d script that checks
> for the existence of a pid file and delete it.
>
>
> ciao
> m.
>
>
> --
> Hofstadter's Law:
> It always takes longer than you expect, even when you take into account
> Hofstadter's Law.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkueFOcACgkQ7ZmvfLU1M3V53wCdG/AtaA4tHOxxTN/dNZjdxRqR
> vgcAni2stbXYn4kJPnhJdzg3btH7hCwi
> =bNrT
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>


-- 
look to the things around you,the immediate world around you, if you are
alive,it will mean something to you ——Paul Strand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20100316/9f214cd0/attachment.htm 


More information about the Twisted-Python mailing list