nginx.conf File too Large

Rami Essaid rami.essaid at
Thu Jul 7 17:45:34 MSD 2011


As of right now we are only using the configuration for one of our customers
in beta and nginx is not giving any errors.  Before we migrate more
customers onto the platform we wanted to get a better idea of the
hypothetical ramifications of having such a large config file.  What are the
best practices for config files and what could go wrong if we have a large
number of hosts configured onto one nginx server each with a lot of


Date: Wed, 6 Jul 2011 22:41:49 +0300
From: Alexandr Gomoliako <zzz at>
To: nginx at
Subject: Re: nginx.conf File too Large
       <CAKb9G9g8vk-SK-i328mWmzrTEmybVNTNH4uLe5ONOf73thqELA at>
Content-Type: text/plain; charset=ISO-8859-1

On 7/6/11, Rami Essaid <rami.essaid at> wrote:
> We are trying to use nginx as a reverse proxy for a large number of sites
> and putting up a lot of rules to direct and traffic for each host. Is
> a number of hosts ({server}) that would be too many for a single nginx
> instance to support? At what point does the configuration file get too
> and start bogging down the nginx server? Currently each host takes up
> 150 lines, and we are looking to put in 25+ hosts onto each server. I
> to know if this realistic?

It doesn't sound like an nginx problem. Nginx usually suggests what to
change if it hits the limit. Can you show us the exact error message?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list