8 messages in ru.sysoev.nginxRe: checking config outputs a pid file
FromSent OnAttachments
Cherife LiMay 26, 2008 8:53 pm 
Jeffrey 'jf' LimMay 26, 2008 9:51 pm 
Igor SysoevMay 26, 2008 10:30 pm 
Jeffrey 'jf' LimMay 26, 2008 10:47 pm 
Cherife LiMay 26, 2008 10:48 pm 
Cherife LiMay 26, 2008 10:56 pm 
Igor SysoevMay 26, 2008 11:03 pm 
Cherife LiMay 26, 2008 11:05 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: checking config outputs a pid fileActions...
From:Cherife Li (cher@public.gmane.org)
Date:May 26, 2008 10:48:34 pm
List:ru.sysoev.nginx

On 05/27/08 12:52, Jeffrey 'jf' Lim wrote:

On Tue, May 27, 2008 at 11:53 AM, Cherife Li
<cher@public.gmane.org <mailto:cher@public.gmane.org>> wrote:

Hi all,

Has anyone noticed that `nginx -t' outputs an empty pid file while the nginx process isn't running.

no, but good catch!!!

No? I'm using 0.7.1.

I can only add if [ ! -s $PID ]; then rm -f $PID fi to the check-config section of my rc file at the moment.

you dont need to, as far as i can tell. nginx just proceeds to overwrite that file with the proper value when it starts up...

Yeah, ur right.

And I got some more info from debug. With v0.7.1 running, when do another start, nginx will try to bind the addr for 5 times while the addr is in use, if the addr is still unavailable after 2.5s, then gives up. But the start command won't give any info, just quietly exit. So I thought nginx has started regularly, but in fact not that case.

So I always do process checking(check pid file) and warning in rc files, including nginx'.

The problem is nginx does give me an empty pid file.

-jf