为了账号安全,请及时绑定邮箱和手机立即绑定

lnmp搭建的服务器过段时间总是会访问不了

lnmp搭建的服务器过段时间总是会访问不了

PHP
ABOUTYOU 2019-03-15 01:09:11
部署在linux上的lnmp架构之前一直运行正常,最近有一台服务器总是会突然挂掉。检查报错日志是这样的 2017/12/14 03:29:12 [info] 25981#0: *133682417 recv() failed (104: Connection reset by peer) while waiting for request, client: 100.97.219.3, server: 0.0.0.0:80 nginx的配置如下: user www www; worker_processes auto; error_log /data/wwwlogs/error_nginx.log info; pid /var/run/nginx.pid; worker_rlimit_nofile 51200; events { use epoll; worker_connections 51200; multi_accept on; } http { #limit_req_zone $limit zone=one:10m rate=100r/s; #limit_conn_zone $limit zone=addr:10m; include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 1024m; client_body_buffer_size 10m; sendfile on; tcp_nopush on; keepalive_timeout 120; server_tokens off; tcp_nodelay on; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 64k; fastcgi_buffers 4 64k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 128k; fastcgi_intercept_errors on; server { ...... } } php-fpm的配置如下: [global] pid = run/php-fpm.pid error_log = log/php-fpm.log log_level = warning emergency_restart_threshold = 30 emergency_restart_interval = 60s process_control_timeout = 5s daemonize = yes ;;;;;;;;;;;;;;;;;;;; ; Pool Definitions ; ;;;;;;;;;;;;;;;;;;;; [www] listen = /dev/shm/php-cgi.sock listen.backlog = 4096 listen.allowed_clients = 127.0.0.1 listen.owner = www listen.group = www listen.mode = 0666 user = www group = www pm = dynamic pm.max_children = 128 pm.start_servers = 11 pm.min_spare_servers = 8 pm.max_spare_servers = 16 pm.max_requests = 2048 pm.process_idle_timeout = 10s request_terminate_timeout = 0 request_slowlog_timeout = 0 pm.status_path = /php-fpm_status slowlog = log/slow.log rlimit_files = 51200 rlimit_core = 0 catch_workers_output = yes env[PATH] = /usr/local/bin:/usr/bin:/bin env[TMP] = /tmp env[TMPDIR] = /tmp env[TEMP] = /tmp
查看完整描述

4 回答

?
肥皂起泡泡

TA贡献1829条经验 获得超6个赞

error_log /data/wwwlogs/error_nginx.log crit;

把 nginx的 报错级别调整一下

查看完整回答
反对 回复 2019-03-18
?
人到中年有点甜

TA贡献1895条经验 获得超7个赞

是不是网卡没有设置开机自启动啊

查看完整回答
反对 回复 2019-03-18
  • 4 回答
  • 0 关注
  • 818 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信