VPS侦探论坛

 找回密码
 注册
查看: 7351|回复: 3

两次灵异的502,找不到原因,求大神指点

[复制链接]
发表于 2014-9-5 02:49:19 | 显示全部楼层 |阅读模式

遇到两次灵异的502,找不到原因,php为5.4,出现问题后把php升级到5.5(同时卸载了memcache和opcache)还是不行,只能重装服务器
PS:弄了一晚上,重装了一次系统,重新装了几次lnmp,每次配置完正常运行,但是一reboot服务器就502了,是不是系统有问题啊?


贴出错误日志,求大神指点

php-fmp.log:
  1. [05-Sep-2014 02:06:38] NOTICE: fpm is running, pid 31635
  2. [05-Sep-2014 02:06:38] NOTICE: ready to handle connections
  3. [05-Sep-2014 02:07:19] NOTICE: Finishing ...
  4. [05-Sep-2014 02:07:19] NOTICE: exiting, bye-bye!
  5. [05-Sep-2014 02:07:21] NOTICE: fpm is running, pid 31677
  6. [05-Sep-2014 02:07:21] NOTICE: ready to handle connections
  7. [05-Sep-2014 02:11:32] NOTICE: Finishing ...
  8. [05-Sep-2014 02:11:32] NOTICE: exiting, bye-bye!
  9. [05-Sep-2014 02:11:33] NOTICE: fpm is running, pid 9466
  10. [05-Sep-2014 02:11:33] NOTICE: ready to handle connections
  11. [05-Sep-2014 02:13:55] NOTICE: Finishing ...
  12. [05-Sep-2014 02:13:55] NOTICE: exiting, bye-bye!
  13. [05-Sep-2014 02:13:57] NOTICE: fpm is running, pid 9517
  14. [05-Sep-2014 02:13:57] NOTICE: ready to handle connections
  15. [05-Sep-2014 02:26:39] NOTICE: Finishing ...
  16. [05-Sep-2014 02:26:39] NOTICE: exiting, bye-bye!
  17. [05-Sep-2014 02:28:10] NOTICE: fpm is running, pid 12538
  18. [05-Sep-2014 02:28:10] NOTICE: ready to handle connections
  19. [05-Sep-2014 02:34:15] NOTICE: Finishing ...
  20. [05-Sep-2014 02:34:15] NOTICE: exiting, bye-bye!
  21. [05-Sep-2014 02:34:18] NOTICE: fpm is running, pid 12581
  22. [05-Sep-2014 02:34:18] NOTICE: ready to handle connections
复制代码
php-fpm.conf:
  1. [global]
  2. pid = /usr/local/php/var/run/php-fpm.pid
  3. error_log = /usr/local/php/var/log/php-fpm.log
  4. log_level = notice

  5. [www]
  6. listen = /tmp/php-cgi.sock
  7. listen.backlog = -1
  8. listen.allowed_clients = 127.0.0.1
  9. listen.owner = www
  10. listen.group = www
  11. listen.mode = 0666
  12. user = www
  13. group = www
  14. pm = dynamic
  15. pm.max_children = 20
  16. pm.start_servers = 2
  17. pm.min_spare_servers = 1
  18. pm.max_spare_servers = 6
  19. request_terminate_timeout = 100
  20. request_slowlog_timeout = 0
  21. slowlog = var/log/slow.log
复制代码
nginx.conf:
  1. user  www www;

  2. worker_processes auto;

  3. error_log  /home/wwwlogs/nginx_error.log  crit;

  4. pid        /usr/local/nginx/logs/nginx.pid;

  5. #Specifies the value for maximum file descriptors that can be opened by this process.
  6. worker_rlimit_nofile 51200;

  7. events
  8.         {
  9.                 use epoll;
  10.                 worker_connections 51200;
  11.                 multi_accept on;
  12.         }

  13. http
  14.         {
  15.                 include       mime.types;
  16.                 default_type  application/octet-stream;

  17.                 server_names_hash_bucket_size 128;
  18.                 client_header_buffer_size 32k;
  19.                 large_client_header_buffers 4 32k;
  20.                 client_max_body_size 50m;

  21.                 sendfile on;
  22.                 tcp_nopush     on;

  23.                 keepalive_timeout 60;

  24.                 tcp_nodelay on;

  25.                 fastcgi_connect_timeout 300;
  26.                 fastcgi_send_timeout 300;
  27.                 fastcgi_read_timeout 300;
  28.                 fastcgi_buffer_size 64k;
  29.                 fastcgi_buffers 4 64k;
  30.                 fastcgi_busy_buffers_size 128k;
  31.                 fastcgi_temp_file_write_size 256k;

  32.                 gzip on;
  33.                 gzip_min_length  1k;
  34.                 gzip_buffers     4 16k;
  35.                 gzip_http_version 1.0;
  36.                 gzip_comp_level 2;
  37.                 gzip_types       text/plain application/x-javascript text/css application/xml;
  38.                 gzip_vary on;
  39.                 gzip_proxied        expired no-cache no-store private auth;
  40.                 gzip_disable        "MSIE [1-6]\.";

  41.                 #limit_conn_zone $binary_remote_addr zone=perip:10m;
  42.                 ##If enable limit_conn_zone,add "limit_conn perip 10;" to server section.

  43.                 server_tokens off;
  44.                 #log format
  45.                 log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
  46.              '$status $body_bytes_sent "$http_referer" '
  47.              '"$http_user_agent" $http_x_forwarded_for';

  48. server
  49.         {
  50.                 listen 80 default;
  51.                 #listen [::]:80 default ipv6only=on;
  52.                 return 500;
  53.         }
  54. include vhost/*.conf;
  55. }
复制代码

[ 本帖最后由 rewalax 于 2014-9-5 07:23 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2014-9-5 08:43:41 | 显示全部楼层


重启后就502你重启完ps aux看看php-fpm是否运行
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2014-9-5 08:54:53 | 显示全部楼层

回复 2# 的帖子


感谢军哥救急,重启后发现php-fpm没有运行了,但是我怎么php-fpm restart/reload 或者lnmp restart都没用, 而且我开slow-log怎么没有反应啊
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2014-9-5 13:15:57 | 显示全部楼层

回复 3# 的帖子




/etc/init.d/php-fpm start 可以启动吗
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-26 03:22 , Processed in 0.026040 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表