runit and nginx
Mike
lists.accounts at gmail.com
Sun Mar 4 23:24:59 MSK 2007
Igor Sysoev wrote:
> On Tue, Feb 20, 2007 at 01:36:10PM +0000, Chris McGrath wrote:
>
>> I'm using runit to supervise nginx, and to get it to work properly, I
>> had to set
>>
>> daemon = off;
>>
>> In the nginx.conf. The documentation says that this shouldn't be used
>> in production. I was wondering why this was and if it is safe to keep
>> running like this.
>
> The "daemon off" and "master_process off" were initially created
> for development only. However, some people started to run nginx under
> daemontools and so on using "daemon off". Non-daemonized nginx runs
> without problems except you can not do online upgrade.
>
> But "master_process off" should be never used in production.
>
>
Is there any way that this can be changed in the future? Non-disruptive
upgrades to nginx are an awesome feature that we would love to exploit,
but we are also using Runit to handle the service (and Launchd is
handling Runit).
FWIW, as a side note to Runit (don't want to drag this
off-topic/off-list), we employ Mac OS X, and more specifically 10.4.x.
When I initially compiled Runit and set it to control nginx, the runsv
process would ramp the CPU up to 98%. Not good. Running a kernel trace
on the process showed that it was a problem with "poll" in OS X. It
turns out that "poll" is broken. However, "select" works fine. Then I
found the following info:
<http://marc.theaimsgroup.com/?l=log&m=111515776629581&w=2>
Although the article talks of daemontools, Runit is based on the same
code I believe. Fortunately, trypoll.c exists in the Runit source code,
so the above fix works fine.
Just thought I would post this in case anyone else wanted to use Runit
and OS X. Sorry if off-list.
Mike
More information about the nginx
mailing list