Nginx Nginx - error log critical options (disk full)
2014.08.21 14:46
error 로그가 하염없이.. 생겨서 디스크 풀이 날경우가 있습니다.
필자가 실제로 당해본..ㅠㅠ
nginx.conf 의 http 구문에 error_log 변수에 로그의 critical한 부분만 로깅을 할수 있도록 설정 하면 됩니다.
필자가 실제로 당해본..ㅠㅠ
[root@yongbok ~]# df -h /dev/ad4s1a
Filesystem Size Used Avail Capacity Mounted on
/dev/ad4s1a 38G 38G -2.9G 108% /
nginx.conf 의 http 구문에 error_log 변수에 로그의 critical한 부분만 로깅을 할수 있도록 설정 하면 됩니다.
#----------------------------------#
user www;
pid logs/nginx.pid;
#----------------------------------#
#worker_rlimit_nofile 51200;
worker_processes 2; # number of CPU core
events {
worker_connections 1024;
use kqueue;
# FreeBSD - kqueue
# Linux - epoll
}
#----------------------------------#
http {
include mime.types;
default_type application/octet-stream;
access_log off;
error_log log/error.log crit;
## Size Limits
client_body_buffer_size 5m;
client_header_buffer_size 5m;
client_max_body_size 5m;
large_client_header_buffers 8 8m;
## Timeouts
client_body_timeout 5;
client_header_timeout 5;
send_timeout 5;
# Keep Alive
keepalive_timeout 0;
#keepalive_requests 5;
#keepalive_timeout 15;
## General Options
ignore_invalid_headers on;
limit_zone gulag $binary_remote_addr 1m;
recursive_error_pages on;
reset_timedout_connection on;
server_names_hash_bucket_size 128;
sendfile on;
server_name_in_redirect off;
server_tokens off;
aio on;
directio 64m;
## TCP options
tcp_nodelay on;
tcp_nopush on;
## Compression
gzip on;
gzip_vary on;
gzip_static on;
gzip_buffers 16 1m;
gzip_comp_level 9;
gzip_http_version 1.1;
gzip_min_length 0;
gzip_types text/css text/xml application/x-javascript application/atom+xml application/rss+xml text/plain image/x-icon application/java-archive application/msword application/pdf application/vnd.ms-excel application/vnd.ms-powerpoint application/vnd.wap.xhtml+xml application/x-xpinstall;
## Expires
#expires 1y;
#add_header Cache-Control private;
## GEOIP
geoip_country /usr/local/share/GeoIP/GeoIP.dat;
#geoip_city /usr/local/share/GeoIP/GeoLiteCity.dat;
geo $country {
default no;
include nginxGeo.txt;
}
## add header
add_header Admin 김용복;
add_header E-Mail ruo91@yongbok.net;
#upstream backend {
#server apache.yongbok.net:81;
#server mysql.yongbok.net:81;
#}
include vhosts/*.conf;
}
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
29 | Max Clients 수정 | Kim | 2014.08.21 | 4716 |
28 | 아파치 현재설정 확인 | Kim | 2014.08.21 | 5211 |
27 | Bad Sector 확인 | Kim | 2014.08.21 | 5396 |
26 | 네트워크 재시작 | Kim | 2014.08.21 | 4988 |
25 | 서버 리눅스 핑막기 | Kim | 2014.08.21 | 5196 |
24 | HOSTNAME | Kim | 2014.08.21 | 4925 |
23 | ip_conntrack: table full, dropping packet | Kim | 2014.08.21 | 5095 |
22 | 네트워크 연결 속도 확인 | Kim | 2014.08.21 | 5370 |
21 | 리눅스 하드디스크 배드 블럭 점검 badblocks | Kim | 2014.08.21 | 6428 |
20 | 리눅스에서 하드디스크 추가로달고 마운트하기 | Kim | 2014.08.21 | 17289 |
» | Nginx - error log critical options (disk full) | Kim | 2014.08.21 | 5492 |
18 | 서버점검목록 1탄 | Kim | 2014.08.21 | 4653 |
17 | 64bit linux에 php with mysql시 다음 에러 해결 방법 | Kim | 2014.08.21 | 5343 |
16 | nginx 프로세스 죽이지 않고 설정값 재적용 | Kim | 2014.08.21 | 4980 |
13 | nginx xe 1.7.5.7 rewrite rule | Kim | 2014.08.21 | 1373371 |
12 | 웹페이지 로딩 비교 사이트 | Kim | 2014.08.22 | 5634 |
11 | Windows 7에서 NAS 삼바로 접속하기 [1] | Kim | 2014.08.27 | 7685 |
10 | ServerWMC 이용 외부에서 XBMC이용 TV보기 | Kim | 2014.08.27 | 6518 |