随机Nginx 502,504,522等

时间:2015-01-16 03:54:55

标签: php mysql nginx

我的网站会随机间隔变得无法响应,加载它的唯一方法就是控制台。当然,这是一项简单的任务,但我无法持续监控我的网站。

service php5-fpm restart

我不知道如何解决此问题,但这是我的配置文件。

的/ etc / nginx的/位点可用/默认

 server {
    listen   80;
    listen   443 ssl;
    default_type text/html;  

    server_name epicmc.us;

    root /usr/share/nginx/html;
    index index.php index.html index.htm;

    error_page 404 /404.php;

    # pass the PHP scripts to FastCGI server listening on the php-fpm socket
    location ~ \.php$ {
         try_files $uri =404;
         fastcgi_pass unix:/var/run/php5-fpm.sock;
         fastcgi_index index.php;
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
         include fastcgi_params;
    }
}

/etc/nginx/nginx.conf

user www-data;
worker_processes 4;
pid /run/nginx.pid;

events {
    worker_connections 768;
    # multi_accept on;
}

http {

    ##
    # Basic Settings
    ##

    client_max_body_size 8M;
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 8000;
    # server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip on;
    gzip_disable "msie6";

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    # gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # nginx-naxsi config
    ##
    # Uncomment it if you installed nginx-naxsi
    ##

    #include /etc/nginx/naxsi_core.rules;

    ##
    # nginx-passenger config
    ##
    # Uncomment it if you installed nginx-passenger
    ##

    #passenger_root /usr;
    #passenger_ruby /usr/bin/ruby;

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}


#mail {
#   # See sample authentication script at:
#   # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
# 
#   # auth_http localhost/auth.php;
#   # pop3_capabilities "TOP" "USER";
#   # imap_capabilities "IMAP4rev1" "UIDPLUS";
# 
#   server {
#       listen     localhost:110;
#       protocol   pop3;
#       proxy      on;
#   }
# 
#   server {
#       listen     localhost:143;
#       protocol   imap;
#       proxy      on;
#   }
#}

/etc/php5/fpm/php.ini 这是远程托管的,因为它太大而无法托管。 http://pastebin.pw/683h6n

这是我的Nginx错误日志 - 它太大了,不能粘贴在这里(或任何地方)而不会崩溃我的整个浏览器。 .log可在此处下载:http://uploads.pw/v/480801/

0 个答案:

没有答案