Set worker_processes to _SERVER

can i set worker_processes to _SERVER[“NUMBER_OF_PROCESSORS”]
looking in phpinfo there is a server variable that mentions the number
of
processors

Hi,

On Sat, Sep 19, 2009 at 3:01 AM, Ziyad S. [email protected]
wrote:

can i set worker_processes to _SERVER[“NUMBER_OF_PROCESSORS”]
looking in phpinfo there is a server variable that mentions the number of
processors

No, I don’t think so. ‘worker_processes’ is set only during the
initialization phase. It expects a number rather than a variable.

Regards,

On Sat, Sep 19, 2009 at 11:21:05AM +0800, Joshua Z. wrote:

Hi,

On Sat, Sep 19, 2009 at 3:01 AM, Ziyad S. [email protected] wrote:

can i set worker_processes to _SERVER[“NUMBER_OF_PROCESSORS”]
looking in phpinfo there is a server variable that mentions the number of
processors

No, I don’t think so. ‘worker_processes’ is set only during the
initialization phase. It expects a number rather than a variable.

Yes, it can be set on start time only.
However, you may use variable value (FreeBSD example):

nginx -g “worker_processes sysctl -n hw.ncpu;”

On Sat, Sep 19, 2009 at 12:01:24AM +0500, Ziyad S. wrote:

can i set worker_processes to _SERVER[“NUMBER_OF_PROCESSORS”]
looking in phpinfo there is a server variable that mentions the number of
processors

On Windows you should use single worker, since Windows routes all
connections to one process only anyway.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs