Почему не прогружается полностью страница nginx+php-fpm?
Добрый день, есть страница, что довольно частенько ее стало отдавать неполностью.
То есть страница стала просто обрываться, но это не у всех, случается случается. Сначала грешил на код php что возникает ошибка и он ее просто не загружается, просмотрел код, он банально бьет его.
Перезагружал nginx
Вот конфиги
# For more information on configuration, see: # * Official English Documentation: nginx.org/en/docs/ # * Official Russian Documentation: nginx.org/ru/docs/ user maestra; worker_processes 8; worker_priority -5; worker_rlimit_nofile 4096; events { use epoll; worker_connections 4096; } error_log /var/log/nginx/error.log; pid /run/nginx.pid; http { log_format main '$remote_addr — $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; client_body_buffer_size 16K; client_header_buffer_size 4k; client_max_body_size 32M; large_client_header_buffers 8 32k; client_body_timeout 60; client_header_timeout 60; keepalive_timeout 60; send_timeout 60; reset_timedout_connection on; server_tokens off; gzip on; gzip_static on; gzip_min_length 1100; gzip_buffers 64 8k; gzip_comp_level 4; gzip_http_version 1.1; gzip_proxied any; # gzip_types text/plain application/xml application/x-javascript text/css; gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xm$ limit_req_zone $binary_remote_addr zone=dynamic:10m rate=2r/s; proxy_connect_timeout 60000s; proxy_send_timeout 60000s; proxy_read_timeout 60000s; fastcgi_buffers 8 16k; fastcgi_buffer_size 32k; fastcgi_send_timeout 60000s; fastcgi_connect_timeout 300; fastcgi_read_timeout 60000s; server_name_in_redirect off; # Load modular configuration files from the /etc/nginx/conf.d directory. # See nginx.org/en/docs/ngx_core_module.html#include # for more information. upstream www { server unix:/var/run/php-fpm-pools/www.sock; #server 127.0.0.1:9000; } upstream maestra { server unix:/var/run/php-fpm-pools/maestra.sock; #server 127.0.0.1:9000; } include /etc/nginx/conf.d/*.conf; server { listen 80 default_server; listen [::]:80; # listen 87.118.107.23:443 ssl; # listen [::]:443 ssl; # ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # ssl_prefer_server_ciphers on; # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; # ssl_certificate /etc/nginx/ssl/ssl.crt; # ssl_certificate_key /etc/nginx/ssl/private.key; # ssl_session_cache shared:SSL:10m; # ssl_session_timeout 10m; server_name myadmin.maestra.ru _; root /usr/share/nginx/html; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location / { } location ~ \.php$ { root /usr/share/nginx/html; try_files $uri =404; #fastcgi_pass 127.0.0.1:9000; fastcgi_pass www; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } } }
server { listen 87.118.107.23:80; listen [::]:80; #listen 87.118.107.23:443 ssl; # listen [::]:443 ssl; # ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # ssl_prefer_server_ciphers on; # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; # ssl_certificate /etc/nginx/ssl/ssl.srt; # ssl_certificate_key /etc/nginx/ssl/private.key; # ssl_session_cache shared:SSL:10m; # ssl_session_timeout 10m; server_name admin.maestra.ru; root /home/maestra/www/admin.maestra.ru; access_log /var/log/nginx/admin.maestra.ru_access.log; error_log /var/log/nginx/admin.maestra.ru_error.log; index index.php; charset UTF-8; include /etc/nginx/default.d/*.conf; location / { } location ~ \.php$ { limit_req zone=dynamic burst=20; fastcgi_pass maestra; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
То есть страница стала просто обрываться, но это не у всех, случается случается. Сначала грешил на код php что возникает ошибка и он ее просто не загружается, просмотрел код, он банально бьет его.
Перезагружал nginx
Вот конфиги
# For more information on configuration, see: # * Official English Documentation: nginx.org/en/docs/ # * Official Russian Documentation: nginx.org/ru/docs/ user maestra; worker_processes 8; worker_priority -5; worker_rlimit_nofile 4096; events { use epoll; worker_connections 4096; } error_log /var/log/nginx/error.log; pid /run/nginx.pid; http { log_format main '$remote_addr — $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; client_body_buffer_size 16K; client_header_buffer_size 4k; client_max_body_size 32M; large_client_header_buffers 8 32k; client_body_timeout 60; client_header_timeout 60; keepalive_timeout 60; send_timeout 60; reset_timedout_connection on; server_tokens off; gzip on; gzip_static on; gzip_min_length 1100; gzip_buffers 64 8k; gzip_comp_level 4; gzip_http_version 1.1; gzip_proxied any; # gzip_types text/plain application/xml application/x-javascript text/css; gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xm$ limit_req_zone $binary_remote_addr zone=dynamic:10m rate=2r/s; proxy_connect_timeout 60000s; proxy_send_timeout 60000s; proxy_read_timeout 60000s; fastcgi_buffers 8 16k; fastcgi_buffer_size 32k; fastcgi_send_timeout 60000s; fastcgi_connect_timeout 300; fastcgi_read_timeout 60000s; server_name_in_redirect off; # Load modular configuration files from the /etc/nginx/conf.d directory. # See nginx.org/en/docs/ngx_core_module.html#include # for more information. upstream www { server unix:/var/run/php-fpm-pools/www.sock; #server 127.0.0.1:9000; } upstream maestra { server unix:/var/run/php-fpm-pools/maestra.sock; #server 127.0.0.1:9000; } include /etc/nginx/conf.d/*.conf; server { listen 80 default_server; listen [::]:80; # listen 87.118.107.23:443 ssl; # listen [::]:443 ssl; # ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # ssl_prefer_server_ciphers on; # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; # ssl_certificate /etc/nginx/ssl/ssl.crt; # ssl_certificate_key /etc/nginx/ssl/private.key; # ssl_session_cache shared:SSL:10m; # ssl_session_timeout 10m; server_name myadmin.maestra.ru _; root /usr/share/nginx/html; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location / { } location ~ \.php$ { root /usr/share/nginx/html; try_files $uri =404; #fastcgi_pass 127.0.0.1:9000; fastcgi_pass www; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } } }
server { listen 87.118.107.23:80; listen [::]:80; #listen 87.118.107.23:443 ssl; # listen [::]:443 ssl; # ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # ssl_prefer_server_ciphers on; # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; # ssl_certificate /etc/nginx/ssl/ssl.srt; # ssl_certificate_key /etc/nginx/ssl/private.key; # ssl_session_cache shared:SSL:10m; # ssl_session_timeout 10m; server_name admin.maestra.ru; root /home/maestra/www/admin.maestra.ru; access_log /var/log/nginx/admin.maestra.ru_access.log; error_log /var/log/nginx/admin.maestra.ru_error.log; index index.php; charset UTF-8; include /etc/nginx/default.d/*.conf; location / { } location ~ \.php$ { limit_req zone=dynamic burst=20; fastcgi_pass maestra; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
Похожие публикации
Не пускают на собственные сайты
Как защититься от хулигана?
помогите советом нубу
Вопрос по нагрузке форума phpBB на хостинг(на ядро cpu) ?
CMS DLE и хостинг sWeb.ru
Нет комментариев