# Configuration for a high traffic page?

**URL:** <https://www.ruby-forum.com/t/configuration-for-a-high-traffic-page/208339>\
**Category:** NGINX\
**Created:** [June 15, 2011, 5:03pm UTC](https://www.ruby-forum.com/t/configuration-for-a-high-traffic-page/208339 "2011-06-15T17:03:57Z")\
**Posts on this page:** 1\
**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:** [June 15, 2011, 5:03pm UTC](https://www.ruby-forum.com/t/configuration-for-a-high-traffic-page/208339/1 "2011-06-15T17:03:57Z")

</div>

Good morning,  
can give me someone an example or optimize my example configuration for  
a high traffic page?  
I’m running Nginx on a Intel(R) Xeon(R) CPU X3440 @ 2.53GHz, 8 cores  
with 16 GB RAM DDR3.  
With Nginx I run FastCGI-PHP5:  
location ~ .php$ {  
fastcgi\_pass 127.0.0.1:9000;  
fastcgi\_index index.php;  
fastcgi\_param SCRIPT\_FILENAME  
/var/www/htdocs$fastcgi\_script\_name;  
include fastcgi\_params;  
fastcgi\_intercept\_errors on;  
}

The site is a small search engine for some products, so the visitor can  
make just a request for some keyword. (So no big POST Uploads for files  
or so…).  
But for Administrators exists an administration area, where they can  
upload images etc. so there should be the post limit not limited.

1. What is the optimal configuration for the timeouts and the buffers?

2. Should I move to PHP-fpm?

## My nginx.conf:

user www-data;  
worker\_processes 4;

error\_log /var/log/nginx/error.log;  
pid /var/run/nginx.pid;

events {  
worker\_connections 1024;  
}

http {  
include /etc/nginx/mime.types;  
default\_type application/octet-stream;

```
access_log off;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
#keepalive_timeout 65;
tcp_nodelay on;

gzip on;
gzip_buffers 16 8k;
gzip_comp_level 9;

```

gzip\_http\_version 1.1;  
gzip\_min\_length 10;  
gzip\_types text/plain text/css image/png image/gif image/jpeg  
application/x-javascript text/xml application/xml application/xml+rss  
text/javascript image/x-icon;  
gzip\_vary on;  
gzip\_proxied any;  
gzip\_disable “MSIE [1-6].”;

## SIZES - What is the optimal configuration?

#client\_body\_buffer\_size 8k;  
#client\_header\_buffer\_size 1k;  
#client\_max\_body\_size 1M;  
#large\_client\_header\_buffers 2 1k;

## Timeouts - What is here the optimal configuration?

client\_body\_timeout 10;  
client\_header\_timeout 10;  
keepalive\_timeout 5 5;  
send\_timeout 10;

```
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

```

}

Thank you very much!

Posted at Nginx Forum:

> **[Configuration for a high traffic page?](https://forum.nginx.org/read.php?2,207191,207191#msg-207191)**
>
> Good morning, can give me someone an example or optimize my example configuration for a high traffic page? I'm running Nginx on a Intel(R) Xeon(R) CPU X3440 @ 2.53GHz, 8 cores with 16 GB RAM DDR3. With Nginx I run FastCGI-PHP5: location ~ \\.php$ {...
