|
|
|
|
АРХИВ :: nginx-ru
|
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: огромный iowait :(
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexey Kovyrin wrote:
> А может и правда ваши диски не выдерживают рандомного I/O?
>
С чем именно был связан глюк так и не понял... наверняка какая-нибудь
незакрытая скобка. Проблема решилась путем переписания конфига и
шаблона для виртуальных хостов. Теперь для файла в 5 гигов iowait и не
дрогнет.
Если кому интересно вот конфиг с одним виртуальным хостом.
_____________________________________________________________
user www-data;
worker_processes 3;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format combined_ispconfig
'$server_name||||$bytes_sent||||$remote_addr - - [$time_local]
"$request" $status $bytes_sent "$http_referer" "$http_user_agent"';
access_log /var/log/httpd/ispconfig_access_log combined_ispconfig;
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
client_header_buffer_size 1k;
large_client_header_buffers 4 4k;
gzip on;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_types text/plain;
output_buffers 1 32k;
postpone_output 1460;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
######################################
# Vhost: www.xxxx.org
######################################
#
#
server{
listen 80;
server_name www.xxxx.org xxxx.org ;
error_log /home/user/log/nginx_error.log.nginx info;
override_charset off;
location ~*
^.+\.(jpg|jpeg|gif|png|ico|js|rar|zip|7z|avi|mpg|mpeg|mov|bz2|mp3|wmv|iso)$
{
root /home/user/web;
}
location / {
proxy_pass http://xx.xx.xx.xx:8080/;
proxy_redirect default;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
index index.html index.htm index.php index.php5 index.php4
index.php3 index.shtml index.cgi index.pl index.jsp Default.htm
default.htm;
}
error_page 400 /home/user/web/error/invalidSyntax.html;
error_page 401 /home/user/web/error/authorizationRequired.html;
error_page 403 /home/user/web/error/forbidden.html;
error_page 404 /home/user/web/error/fileNotFound.html;
error_page 405 /home/user/web/error/methodNotAllowed.html;
error_page 500 /home/user/web/error/internalServerError.html;
error_page 503 /home/user/web/error/overloaded.html;
location /icon {
root
/home/admispconfig/ispconfig/tools/awstats/wwwroot/icon/;
}
##virtual host custom directives
set $limit_rate 250k;
##end of custom directives
location ~* ^.+.(rar|zip|7z|avi|mpg|mpeg|mov|bz2|mp3|wmv)$ {
valid_referers none *.xxxx.org server_names;
if ($invalid_referer){
rewrite ^/ http://www.xxxx.org permanent;
}
# root /home/user/web;
}
if ($host !~* ^www.xxxx.org){
rewrite ^(.*)$ http://www.xxxx.org$1 permanent;
}
}
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFFlIpjcxZVBUmYejIRAsaqAJ9c/q7EGLg36gw7dXbpNv9LjYlRtgCgmtwk
hUk2/hGp6N8W0eIf7qTpq6I=
=3I2K
-----END PGP SIGNATURE-----
|
|
|