Amazon EC2 : Increase server_names_hash_bucket_size: 64

1,898 views
Skip to first unread message

Yariv

unread,
Jun 1, 2011, 9:17:44 AM6/1/11
to BigBlueButton-Setup
After Signing up an account with Amazon EC2 and installing BBB on an
Ubuntu Image,
During the installation, I had to:
bbb-conf --setip <domain name or IP accessible from the internet>

but then after bbb-conf --clean

I received the following error:
"Starting nginx: [emerg]: could not build the server_names_hash, you
should increase server_names_hash_bucket_size: 64"

so I fix the file /etc/nginx/nginx.conf to include:
server_names_hash_bucket_size 64;

but in my case, my domain name was sufficiently long that nginx
couldn't
hash it with 64 bits, and still got the same error, so had to increase
the length to 128;

http {
include /etc/nginx/mime.types;

access_log /var/log/nginx/access.log;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;
tcp_nodelay on;

gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";

server_names_hash_bucket_size 128;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}

Hope it can save some debug time in the future to any new member,
Regards,
Yariv

HostBBB.com

unread,
Jun 1, 2011, 9:43:23 AM6/1/11
to BigBlueButton-Setup
Yariv, Were you using an official ubuntu ebs ami... and what size
was the instance you started?
thanks for documenting.

regards,
Stephen
hostbbb.com

Fred Dixon

unread,
Jun 1, 2011, 9:52:36 AM6/1/11
to bigbluebu...@googlegroups.com
I don't think Yariv's problem was related to the instance; rather, when using

sudo bbb-conf --setip hostname

the hostname was longer than nginx was able to assign to server_name.
Increasing the server_names_hash_bucket_size to 128 is the correct
solution.

Regards,... Fred

> --
> You received this message because you are subscribed to the Google Groups "BigBlueButton-Setup" group.
> To post to this group, send email to bigbluebu...@googlegroups.com.
> To unsubscribe from this group, send email to bigbluebutton-s...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/bigbluebutton-setup?hl=en.
>
>

Yariv

unread,
Jun 1, 2011, 5:33:50 PM6/1/11
to BigBlueButton-Setup
Hi Stephen,
I started an official Ubuntu AMI: ubuntu-images/ubuntu-lucid-10.04-
i386-server-20110201.1 (ami-2492ec76)
with Type: m1.small
Please let me know if I need to provide you with more input on the
machine.
And the root of my problem is since I don't have any domain name, I
used EC2 public DNS provided by Amazon
But their Public DNS has the form of ec2-XX-XX-XX-XX.ap-
southeast-1.compute.amazonaws.com(XX-XX-XX-XX is the public IP)
and then I got the following error:

"Starting nginx: [emerg]: could not build the server_names_hash, you
should increase server_names_hash_bucket_size: 64"

And this DNS name was too long to hash with even 64bit so had to
increase it to 128bit.

There is a small bug in the system that although I changed the bucket
size to 64 (that was still not enough), nginx still gave me the same
error and it made me confused and try to debug in the wrong direction.

Question:
=======
Is it possible to open a bug in nginx to indicate to the user the
correct number that have to be assign to nginx, or calculate it
itself?
==================================================================================================

Cooperativa Ceposs

unread,
Sep 20, 2013, 2:01:51 PM9/20/13
to bigbluebu...@googlegroups.com, yariv....@gmail.com
well, thanks so much, i saved a lot of debug time, thanks
Reply all
Reply to author
Forward
0 new messages