标题:
[求助]
首字节加载慢 + connect() to unix:/tmp/php-71-cgi.sock failed
[打印本页]
作者:
d40355
时间:
2018-11-29 10:20
标题:
首字节加载慢 + connect() to unix:/tmp/php-71-cgi.sock failed
hi,我的wdcp下运行了discuz程序,近期发现首字节waiting ttfb加载比较慢,有时最高能到10几秒的等待时间,上了CDN打开速度是很快,不过ttfb还在。
如何能破解首字节等待太久的问题啊……
另外
connect() to unix:/tmp/php-71-cgi.sock failed (11: Resource temporarily unavailable)
后台nginx错误日志里面这个问题
网上搜了好些方法(有的说listen = /tmp/php-71-cgi.sock改成127.0.0.1 同时他提到会导致phpmyadmin打不开),我还没敢尝试……不知道哪个适用wdcp
求赐教。跪谢
以下是我的配置%
/www/wdlinux/phps/71/etc/php-fpm.conf
[global]
pid = /www/wdlinux/phps/71/var/run/php-fpm.pid
error_log = /www/wdlinux/phps/71/var/log/php-fpm.log
log_level = notice
[www]
listen = /tmp/php-71-cgi.sock
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666
user = www
group = www
pm = dynamic
pm.max_children = 20
pm.start_servers = 5
pm.min_spare_servers = 2
pm.max_spare_servers = 12
pm.max_requests = 2000
request_terminate_timeout = 60
复制代码
/www/wdlinux/nginx-1.8.1/conf/nginx.conf
# nginx conf conf/nginx.conf
# Created by http://www.wdlinux.cn
# Last Updated 2010.06.01
user www www;
worker_processes 3;
error_log logs/error.log notice;
pid logs/nginx.pid;
worker_rlimit_nofile 5120;
events {
use epoll;
worker_connections 5120;
}
http {
include mime.types;
default_type application/octet-stream;
resolver 8.8.8.8;
server_names_hash_bucket_size 128;
client_header_buffer_size 256k;
large_client_header_buffers 8 64k;
client_max_body_size 50m;
client_body_buffer_size 1024k;
limit_conn_zone $binary_remote_addr zone=one:32k;
sendfile on;
tcp_nopush on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 1024k;
keepalive_timeout 60;
tcp_nodelay on;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
log_format wwwlogs '$remote_addr - $remote_user [$time_local] $request $status $body_bytes_sent $http_referer $http_user_agent $http_x_forwarded_for';
access_log off;
#include default.conf;
include vhost/*.conf;
}
复制代码
/www/wdlinux/etc/my.cnf
# mysql conf /etc/my.cnf
# Created by http://www.wdlinux.cn
# Last Updated 2010.06.01
[client]
port = 3306
socket = /tmp/mysql.sock
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 2M
table_open_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 2M
myisam_sort_buffer_size = 64M
thread_cache_size = 128
query_cache_size = 64M
thread_concurrency = 8
max_connections = 3000
wait_timeout = 120
interactive_timeout = 30
max_connect_errors = 3000
long_query_time = 1
tmp_table_size = 64M
#log-bin=mysql-bin
#binlog_format=mixed
#server-id = 1
[mysqldump]
quick
max_allowed_packet = 8M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
复制代码
欢迎光临 WDlinux官方论坛 (http://wdlinux.cn/bbs/)
Powered by Discuz! 7.2