Я настраиваю новый сервер, но мой сайт продолжает работать после перехода на более качественный сервер.
Спецификация сервера:
ЦП: 56
Название модели: Intel (R) Xeon (R) Gold 5120 CPU @ 2,20 ГГц
Mem: 30G
Чтение - запись 8,1 ГБ / с - 1,9 ГБ / с
Nginx / 1.12.2
PHP 5.6.40
5.5.63-MariaDB MariaDB Сервер
Конфигурация nginx:
location / {
index index.php index.html index.htm;
rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
try_files $uri $uri/ /index.php?$args;
proxy_read_timeout 660s;
proxy_send_timeout 660s;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9002;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort on;
fastcgi_connect_timeout 600;
fastcgi_send_timeout 660;
fastcgi_read_timeout 660;
fastcgi_buffer_size 256m;
fastcgi_buffers 16 128m;
fastcgi_busy_buffers_size 256m;
fastcgi_temp_file_write_size 256m;
}
Конфигурация php-fpm:
listen.allowed_clients = 127.0.0.1
pm =ondemand
pm.process_idle_timeout = 5s
pm.max_children = 100
;pm.start_servers = 30
;pm.min_spare_servers = 10
;pm.max_spare_servers = 20
;pm.max_requests = 2500
pm.max_requests = 450
;pm.status_path = /status
request_terminate_timeout = 500s
slowlog = /var/log/php-fpm/www-slow.log
request_slowlog_timeout = 200s
php_admin_value[error_log] = /var/log/php-fpm/error.log
php_admin_flag[log_errors] = on
php_value[session.save_handler] = files
php_value[session.save_path] = /var/lib/php/session
catch_workers_output = yes
my.cnf:
[mysqld]
max_connections = 550
datadir =/var/lib/mysql
port = 3306
innodb_force_recovery = 4
default-storage-engine=MyISAM
socket = /var/lib/mysql/mysql.sock
key_buffer_size = 4G
max_allowed_packet = 3048M
table_open_cache = 2048
net_read_timeout=3600
net_write_timeout=3600
sort_buffer_size = 8M
read_buffer_size = 8M
read_rnd_buffer_size = 32M
myisam_sort_buffer_size = 128M
thread_cache_size = 40
query_cache_type = 1
query_cache_size = 4G
max_heap_table_size = 1024M
tmp_table_size =1024M
Может кто-нибудь помочь улучшить это?