You just need to increase the size of the hash table as an when you increase the server
 It depends on your setup, you can reduce the number of server from the table and reload the service instead of restart.
service nginx reload
server_names_hash_max_size
Its default value is 512. If you are hosting hundreds of sites on your server.
 Nginx suggests, you can change either server_names_hash_max_size or server_names_hash_bucket_size to accomodate large number of sites, but I prefer keeping server_names_hash_bucket_size as it is and making server_names_hash_max_size big in multiple of 2’s till error disappears.
 On a server, where we host 300+ sites, we needed to change it to 8192
Use a trick to find out correct size by using following command:
ls /etc/nginx/sites-available/ | wc -c
 
                