diff --git a/doc/TOC.md b/doc/TOC.md index e64cf20..7e83cac 100644 --- a/doc/TOC.md +++ b/doc/TOC.md @@ -6,6 +6,7 @@ * [Usage](usage.md) — Overview of the project contents. * [Nginx.conf](nginx-conf.md) —General introduction to the main config file. +* [Common problems](common-problems.md) —Dealing with commonly-encounterederrors. ## Related projects diff --git a/doc/common-problems.md b/doc/common-problems.md new file mode 100644 index 0000000..ad7aaa5 --- /dev/null +++ b/doc/common-problems.md @@ -0,0 +1,22 @@ +[Nginx Server Configs homepage](https://github.com/h5bp/server-configs-nginx) + | [Documentation table of contents](TOC.md) + +# Common Problems + +## types_hash errors + +Depending on the server architecture, it's possible to get the following error: + +> could not build the types_hash, you should increase either +> types_hash_max_size: 1024 or types_hash_bucket_size: 32 + +Nginx uses [hash tables](http://nginx.org/en/docs/hash.html) to speed up certain +tasks, usually the default value is sufficient but depending on the actual server +config this error might be encountered. The solution is to do exactly what the +error message suggests, but adding to nginx.conf the following: + + # add this to the http context + types_hash_max_size: 1024; + + ## OR add this to the http context, don't need both + # types_hash_bucket_size: 32