Hello,
I had the same problem. After adding 'sleep 1' it works.
Jeroen
> -----Original Message-----
> From: owner-nginx@sysoev.ru [mailto:owner-nginx@sysoev.ru] On
> Behalf Of mike
> Sent: dinsdag 17 maart 2009 7:57
> To: nginx@sysoev.ru
> Subject: Re: nginx init script for redhat (rhel5)
>
> I changed this minorly
>
> restart() {
> configtest || return $?
> stop
> sleep 1
> start
> }
>
> to include that sleep 1
>
> it seems sometimes "stop" doesn't clean things up fast enough perhaps.
> since then i have had no issues
>
> [root@mia32217www002 build]# service nginx restart
> 2009/03/16 22:48:01 [info] 2934#0: the configuration file
> /etc/nginx/nginx.conf syntax is ok
> 2009/03/16 22:48:01 [info] 2934#0: the configuration file
> /etc/nginx/nginx.conf was tested successfully Stopping nginx:
> [ OK ] Starting nginx: [ OK ]
> [root@mia32217www002 build]# service nginx restart
> 2009/03/16 22:48:03 [info] 2957#0: the configuration file
> /etc/nginx/nginx.conf syntax is ok
> 2009/03/16 22:48:03 [info] 2957#0: the configuration file
> /etc/nginx/nginx.conf was tested successfully Stopping nginx:
> [ OK ] Starting nginx: [ OK ]
> [root@mia32217www002 build]# service nginx restart
> 2009/03/16 22:48:03 [info] 2980#0: the configuration file
> /etc/nginx/nginx.conf syntax is ok
> 2009/03/16 22:48:03 [info] 2980#0: the configuration file
> /etc/nginx/nginx.conf was tested successfully Stopping nginx:
> [ OK ] Starting nginx:
> [root@mia32217www002 build]# service nginx restart
> 2009/03/16 22:49:04 [info] 3052#0: the configuration file
> /etc/nginx/nginx.conf syntax is ok
> 2009/03/16 22:49:04 [info] 3052#0: the configuration file
> /etc/nginx/nginx.conf was tested successfully Stopping nginx:
> [FAILED] Starting nginx: [ OK ]
>
> ^^ that fourth time it failed...
>
> sleep 1 so far seems to be foolproof. my provider probably
> hates me ive been restarting it over and over.
>
>
> On Mon, Mar 16, 2009 at 9:20 PM, Cliff Wells
> <cliff@develix.com> wrote:
> > On Mon, 2009-03-16 at 20:52 -0700, mike wrote:
> >> On Mon, Mar 16, 2009 at 8:51 PM, mike <mike503@gmail.com> wrote:
> >> > On Mon, Mar 16, 2009 at 8:44 PM, Cliff Wells
> <cliff@develix.com> wrote:
> >> >> Oops.