0

Hello My log is blowing up with errors ;( sometimes page takes forever to load

2019/02/01 14:06:23 [info] 880#880: *3090 epoll_wait() reported that client prematurely closed connection while sending request to upstream, client: 142.93.203.222, server: pitamyshawarma.com, request: "GET /templates/shaper_cuisine/css/bootstrap-legacy/accordion.less HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "pitamyshawarma.com" 2019/02/01 14:06:24 [info] 880#880: *3092 client 142.93.203.222 closed keepalive connection 2019/02/01 14:06:24 [error] 880#880: *3042 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined offset: 1 in /var/www/pitamyshawarma.com/html/templates/shaper_cuisine/sppagebuilder/addons/cuisine_menu/site.php on line 56" while reading response header from upstream, client: 74.109.198.57, server: pitamyshawarma.com, request: "GET /menu HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "pitamyshawarma.com", referrer: "https://pitamyshawarma.com/find-us"

settings in nginx

server {
        server_name pitamyshawarma.com www.pitamyshawarma.com
        server_name_in_redirect off;

        access_log /var/log/nginx/localhost.access_log;
        error_log /var/log/nginx/localhost.error_log info;

        root /var/www/pitamyshawarma.com/html;
        index index.php index.html index.htm default.html default.htm;
        # Support Clean (aka Search Engine Friendly) URLs
        location / {
                try_files $uri $uri/ /index.php?$args;
        }

        # deny running scripts inside writable directories
        location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
                return 403;
                error_page 403 /403_error.html;
        }

        location ~ \.php$ {
        fastcgi_cache phpcache; # The name of the cache key-zone to use
        fastcgi_cache_valid 200 30m; # What to cache: 'Code 200' responses, for half an hour
        fastcgi_cache_methods GET HEAD; # What to cache: only GET and HEAD requests (not POST)
        fastcgi_read_timeout 864000;
        add_header X-Fastcgi-Cache $upstream_cache_status; # Add header so we can see if the cache hits or misses


         include snippets/fastcgi-php.conf;

        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;


        }


        # caching of files 
        location ~* \.(ico|pdf|flv)$ {
                expires 1y;
        }

        location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
                expires 14d;
        }


    listen 443 ssl http2; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/pitamyshawarma.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/pitamyshawarma.com/privkey.pem; # managed by Certbot
    #include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot

    #ssl_ciphers **********;

    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
    ssl_session_cache shared:SSL:20m; # holds approx 4000 sessions
    ssl_session_timeout 2h; # 1 hour during which sessions can be re-used.
    ssl_session_tickets off;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

}

server {
    if ($host = www.pitamyshawarma.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    if ($host = pitamyshawarma.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


        listen 80;
        server_name pitamyshawarma.com www.pitamyshawarma.com
        server_name_in_redirect off;
    return 404; # managed by Certbot




}
  • 1
    The first error means the user closed their browser tab before the site loaded. It is very slow, after all. The second is just a bug in your application that you can fix. Neither error tells why your site is slow. You should debug your application. – Michael Hampton Feb 1 at 14:27
  • 019/02/01 13:31:10 [error] 880#880: *3034 FastCGI sent in stderr: "PHP message: PHP Warning: file_put_contents(/var/www/pitamyshawarma.com/html/templates/shaper_cuisine/css/legacy.css): failed to open stream: Permission denied in /var/www/pitamyshawarma.com/html/plugins/system/helix3/core/helix3.php on line 751 PHP message: PHP Warning: file_put_contents(/var/www/pitamyshawarma.com/html/templates/shaper_cuisine/css/template.css): failed to open stream: Permission denied in /var/www/pitamyshawarma.com/html/plugins/system/helix3/core/helix3.php on line 751 – user3191018 Feb 1 at 14:28
  • what is permission denied staff? – user3191018 Feb 1 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.