Short success info and critical number of vhosts

Igor Sysoev is at
Sun Sep 23 17:03:40 MSD 2007

On Sun, Sep 23, 2007 at 01:05:16PM +0200, Janko Hauser wrote:

> Hello, yesterday we switched a zope cluster for 400 sites and 500
> vhosts to nginx as a frontserver. Before we used nginx solely as a
> proxy behind an apache. The switch worked very well and I'm happy to
> have nginx with it's incredible flexibility as frontserver.
> Currently I have one file for every vhosts, which is reduced to the
> bare minimum and uses includes for the general stuff. Is it a burden
> for nginx to read it's config from many files? Would it be better to
> put all regular vhosts into one file?

It depends on you habits. I usually use separate vhosts.

> I needed to expand
> server_names_hash_bucket_size  512;
> Is this necessary because of the many sites, is this an expensive
> change?

It's better to increase server_names_hash_max_size.

> I also noticed during testing, when I generated additional
> "shadow"-vhosts, that I hit the maximum of allowed open files (I can
> probably use ulimit to expand this). Are the config files held open
> after the start, or was this limit because of the also opended
> log-files?

nginx keeps all log files open.
The config files are closed just they have been parsed on (re-)configuration.

Igor Sysoev

More information about the nginx mailing list