ðòïåëôù 


  áòèé÷ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  óôáôøé 


  ðåòóïîáìøîïå 


  ðòïçòáííù 



ðéûéôå
ðéóøíá












     áòèé÷ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ËÏÌÉÞÅÓÔ×Ï workerÏ×, Óonn ectionÏ×, keep-alive É ÐÒÏÞÉÅ -- ËÁË ÎÁÄÏ?



úÄÒÁ×ÓÔ×ÕÊÔÅ!

 root html; ÈÍ...

Wed, 16 Aug 2006 14:13:21 +0400 ÷Ù ÐÉÓÁÌÉ:

AK> Dear All,
AK> 
AK> ðÏÍÏÇÉÔÅ ÒÁÚÏÂÒÁÔØÓÑ ÎÏ×ÉÞËÕ, ÐÏÖÁÌÕÊÓÔÁ.
AK> 
AK> ó×ÑÚËÁ ÉÚ Ä×ÕÈ ÓÅÒ×ÅÒÏ×, frontend+backend, Ä×Á ÓÏÌÑÒÉÓÁ sparc 9.
AK> îÁ ÂÜËÅÎÄÅ áÐÁÞ 1.3.37, ÎÁ ÆÒÏÎÔÅÎÄÅ ×ÓÅÇÄÁ ÂÙÌ Sun Proxy Server.
AK> 
AK> ðÏÄ ×ÌÉÑÎÉÅÍ ÏÔÚÙ×Ï× ÐÒÏ nginx ÚÁÈÏÔÅÌÏÓØ ÅÇÏ ÐÏÓÔÁ×ÉÔØ ÄÁ ÐÒÏ×ÅÒÉÔØ, 
ÐÏÓÔÁ×ÉÌ ÓÏ ×ÓÅÍÉ ÎÁÓÔÒÏÊËÁÍÉ ÐÏ ÕÍÏÌÞÁÎÉÀ, ËÁË ÎÁ 
http://blog.kovyrin.net/2006/05/18/nginx-as-reverse-proxy/, ÔÏÌØËÏ ×ÅÓØ ËÏÎÔÅÎÔ 
ÎÁ áÐÁÞÅ, nginx ÎÉÞÅÇÏ Ó ÌÏËÁÌØÎÏÇÏ ÄÉÓËÁ ÎÅ ÏÔÄÁÅÔ.
AK> 
AK> îÁ ÆÒÏÎÔÅÎÄÅ stub_status ÐÏËÁÚÙ×ÁÅÔ ÎÁÇÒÕÚËÕ ~500 ÒÅË×ÅÓÔÏ× × ÓÅËÕÎÄÕ. ôÁË 
ÏÎÏ ÐÒÉÍÅÒÎÏ É ÅÓÔØ.
AK> 
AK> ôÁË ×ÏÔ, ÅÓÌÉ worker_processes ÄÅÌÁÔØ ÍÎÏÇÏ É worker_connections ÍÎÏÇÏ (ÄÏ 
32*1024), ÍÙ ÐÏÌÕÞÁÅÍ ÔÏÒÍÏÚÁ ÐÒÉ ÒÁÂÏÔÅ, É ÓÏÏÂÝÅÎÉÑ × ÌÏÇ ÓÙÐÑÔÓÑ
AK> upstream timed out (145: Connection timed out) while connecting to upstream 
...
AK> Á ÐÏÔÏÍ ×ÏÏÂÝÅ ÓÅÒÉÉ
AK> accept() failed (24: Too many open files) while accepting new connection on 
0.0.0.0:80
AK> 
AK> åÓÌÉ ÖÅ workers É connections ÓÔÁ×ÉÔØ ÎÅÍÎÏÇÏ (ÏÔ 2*128), ÐÏÌÕÞÁÅÍ × ÌÏÇ
AK> 128 worker_connections is not enough while connecting to upstream
AK> É ÏÐÑÔØ ÖÅ ÓÁÊÔ ÏÔÄÁÅÔÓÑ ÍÅÄÌÅÎÎÏ.
AK> 
AK> þÔÏ ÓÁÍÏÅ ÉÎÔÅÒÅÓÎÏÅ, ÎÅÚÁ×ÉÓÉÍÏ ÏÔ ËÏÌÉÞÅÓÔ×Á worker_processes É 
connections ËÏÌÉÞÅÓÔ×Ï ÏÔËÒÙÔÙÈ ÓÏÅÄÉÎÅÎÉÊ ÍÅÖÄÕ áÐÁÞÅÍ É nginx-ÏÍ ÄÏÒÁÓÔÁÅÔ ÄÏ 
2000. ÷ ÔÏ ×ÒÅÍÑ ËÁË Sun Proxy ×ÓÅÇÄÁ ÄÅÒÖÉÔ ÎÅ ÂÏÌÅÅ 300 É ÎÅ ÔÏÒÍÏÚÉÔ.
AK> 
AK> üÔÕ ÓÉÔÕÁÃÉÀ ÎÁÄÏ ÓÐÅÃÉÁÌØÎÏ ÏÔÌÁÖÉ×ÁÔØ, ÉÌÉ Ñ ÐÒÏÓÔÏ ÞÔÏ-ÔÏ ÎÅÐÒÁ×ÉÌØÎÏ 
ÎÁËÒÕÔÉÌ?
AK> 
AK> ðÏÓÌÅÄÎÉÊ ÒÁÂÏÞÉÊ ËÏÎÆÉÇ ×ÏÔ, Ñ ÔÁÍ ÐÒÏÂÏ×ÁÌ ×ÓÑËÉÅ ÐÁÒÁÍÅÔÒÙ ÍÅÎÑÔØ, ÎÅ 
ÐÏÍÏÇÁÅÔ.
AK> 
AK> =========Beginning of the citation==============
AK> worker_processes  2;
AK> 
AK> 
AK> events {
AK>     worker_connections  128;
AK> }
AK> 
AK> 
AK> http {
AK>     include       conf/mime.types;
AK>     default_type  application/octet-stream;
AK> 
AK>     sendfile        on;
AK> 
AK>     keepalive_timeout 60;
AK>     reset_timedout_connection  on;
AK> 
AK>     tcp_nopush     on;
AK>     tcp_nodelay    on;
AK> 
AK>     gzip on;
AK>     gzip_min_length  1100;
AK>     gzip_buffers     4 8k;
AK>     gzip_types       text/plain;
AK> 
AK>     client_header_buffer_size    1k;
AK>     large_client_header_buffers  4 4k;
AK> 
AK>     output_buffers   1 32k;
AK>     postpone_output 1460;
AK> 
AK>     client_header_timeout  3m;
AK>     client_body_timeout    3m;
AK>     send_timeout           3m;
AK> 
AK>     client_body_temp_path       /usr/local/nginx/logs/client_body_temp;
AK>     proxy_temp_path             /usr/local/nginx/logs/proxy_temp_path;
AK> 
AK> 
AK>     server {
AK>         listen       80;
AK> 
AK>         location /nginx-status {
AK>             stub_status on;
AK>             access_log   off;
AK>             allow user1.domain.com;
AK>             deny all;
AK>         }
AK> 
AK>         location / {
AK>             root html;
AK>             proxy_pass http://backend;
AK>             proxy_redirect off;
AK> 
AK>             proxy_set_header   Host    $http_host;
AK>             proxy_set_header   X-Real-IP        $remote_addr;
AK> 
AK>             client_max_body_size       10m;
AK>             client_body_buffer_size    128k;
AK> 
AK>             proxy_connect_timeout      90;
AK>             proxy_send_timeout         90;
AK>             proxy_read_timeout         90;
AK> 
AK>             proxy_buffer_size          4k;
AK>             proxy_buffers              4 32k;
AK>             proxy_busy_buffers_size    64k;
AK>             proxy_temp_file_write_size 64k;
AK> 
AK> 
AK>        }
AK>     }
AK>     upstream  backend  {
AK>                 server www.domain.com;
AK>     }
AK> }
AK> =========The end of the citation================
AK> 
AK> 
AK> --
AK> With best regards, Alexei Korobkin. 
AK> 

-- 
AleXXX V. NovikoFF <alexxx@xxxxxxxxx>




 




Copyright © Lexa Software, 1996-2009.