I think an init.d script could resolve this problem.  <br>But I am curious about why &quot;turning off power without shutdown twisted<br>
server before&quot; could cause such a problem.<br><br>Is it a bug or it has some more fundamental reason?<br><br><div class="gmail_quote">On Mon, Mar 15, 2010 at 7:07 PM, Marco Giusti <span dir="ltr">&lt;<a href="mailto:marco.giusti@gmail.com">marco.giusti@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Mon, Mar 15, 2010 at 06:32:23PM +0800, Peter Cai wrote:<br>
&gt; Someone turn off the server by cutting power of the server.<br>
&gt; When the machine is power on, I found my twisted application could not start<br>
&gt; and emit the following error.<br>
&gt;<br>
&gt; Another twistd server is running, PID 3398<br>
&gt;<br>
&gt; This could either be a previously started instance of your application or a<br>
&gt; different application entirely. To start a new one, either run it in some<br>
&gt; other<br>
&gt; directory, or use the --pidfile and --logfile parameters to avoid clashes.<br>
&gt;<br>
&gt; After I deleted twistd.pid, it could start normally.<br>
&gt;<br>
&gt; I checked if there is process with PID 3398, but there wasn&#39;t.<br>
&gt;<br>
&gt; What might cause this problem?  How to avoid it?<br>
<br>
</div>the problem is caused by turning off power without shutdown twisted<br>
server before. One solution could be create an init.d script that checks<br>
for the existence of a pid file and delete it.<br>
<br>
<br>
ciao<br>
m.<br>
<font color="#888888"><br>
<br>
--<br>
Hofstadter&#39;s Law:<br>
It always takes longer than you expect, even when you take into account<br>
Hofstadter&#39;s Law.<br>
</font><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.10 (GNU/Linux)<br>
<br>
iEYEARECAAYFAkueFOcACgkQ7ZmvfLU1M3V53wCdG/AtaA4tHOxxTN/dNZjdxRqR<br>
vgcAni2stbXYn4kJPnhJdzg3btH7hCwi<br>
=bNrT<br>
-----END PGP SIGNATURE-----<br>
<br>_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>look to the things around you,the immediate world around you, if you are alive,it will mean something to you ——Paul Strand<br>