# Map\_hash\_\*\_size

**URL:** <https://www.ruby-forum.com/t/map-hash-size/210433>\
**Category:** NGINX\
**Created:** [August 8, 2011, 4:20pm UTC](https://www.ruby-forum.com/t/map-hash-size/210433 "2011-08-08T16:20:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [August 8, 2011, 4:20pm UTC](https://www.ruby-forum.com/t/map-hash-size/210433/1 "2011-08-08T16:20:00Z")

</div>

I’m getting the error like this:  
nginx: [emerg] could not build the map\_hash, you should increase either  
map\_hash\_max\_size: 2048 or map\_hash\_bucket\_size: 64

I solved it by setting large values to those two variables, but I didn’t  
quite the why. Could someone explain more about those two values?  
Thanks!

map\_hash\_bucket\_size

“The directive sets the maximum size in a hash table to map variables”  
What exactly is the max size here? Size of how many elements can be  
stored in hash table?

map\_hash\_max\_size

“The directive sets the maximum size of a hash table to hold the  
variable map”  
Then how about the max size here?

Posted at Nginx Forum:

> **[map\_hash\_\*\_size](https://forum.nginx.org/read.php?2,213512,213512#msg-213512)**
>
> I'm getting the error like this: nginx: \[emerg\] could not build the map\_hash, you should increase either map\_hash\_max\_size: 2048 or map\_hash\_bucket\_size: 64 I solved it by setting large values to those two variables, but I didn't quite the why. Could...

---

<div class="post-metadata">

**Author:** ![zflairz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/dc4da7/32.png) [@zflairz](https://www.ruby-forum.com/u/zflairz)\
**Post date:** [August 8, 2011, 4:40pm UTC](https://www.ruby-forum.com/t/map-hash-size/210433/2 "2011-08-08T16:40:32Z")

</div>

Hello!

On Mon, Aug 08, 2011 at 10:19:27AM -0400, zflairz wrote:

> I’m getting the error like this:  
> nginx: [emerg] could not build the map\_hash, you should increase either  
> map\_hash\_max\_size: 2048 or map\_hash\_bucket\_size: 64
> 
> I solved it by setting large values to those two variables, but I didn’t  
> quite the why. Could someone explain more about those two values?  
> Thanks!

You may find general description of \*\_hash\_max\_size and  
\*\_hash\_bucket\_size here:

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

Original documentation in Russian may be found here:

> **[Настройка хэшей](http://nginx.org/ru/docs/hash.html)**

Maxim D.
