nginx connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporarily unavailable)_nginx

网站常出现502 bad gateway,程序没有问题。

根据nginx日志:

复制代码 代码如下:

connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporarily unavailable)

发现phpfpm的listen是unix sock方式运行的,问题可能出在php fpm上。php fpm配置文件里有backlog,backlog是linux服务器在socket处理连接数的定义,phpfpm默认为-1,将-1改为4096,重启php fpm问题解决。

时间: 2024-10-01 04:32:46

nginx connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporarily unavailable)_nginx的相关文章

Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)

:Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) 出现这个问题的原因可能是有另外一个程序正在运行,导致资源被锁不可用.而导致资源被锁的原因,可能是上次安装时没正常完成,而导致出现此状况. 解决方法:输入以下命令 sudo rm /var/cache/apt/archives/lock sudo rm /var/lib/dpkg/lock 之后再安装想装的包,即可解决

/var/cache/apt/archives/lock - open (11 Resource temporarily unavailable)

当你执行Apt-get的时候出现以下错误的 解决方法:&http://www.aliyun.com/zixun/aggregation/37954.html">nbsp;无法获得锁 /var/cache/apt/archives/lock - open (11 Resource temporarily un available) 你一定把新立得/软件更新/添加删除 等与软件安装相关的程序打开了,请把他们关掉吧.apt-get在同一时刻只能有一个在执行.

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

今天在ubuntu上连接mysql数据库时,遇到一个小问题 Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 第一次使用时还可以使用的,突然就不好了,不知道是不是没吃药, 先查看数据库状态: jason@jason-Aspire-EC-471G:~$ sudo /etc/init.d/mysql status (因为我使用的是普通用户,所以要sudo一下) 1.如果出现: ja

php-fpm+nginx环境下只显示The page you are looking for is temporarily unavailable

今天在升级wordpress的时候,过程中突然出现"The page you are looking for is temporarily unavailable"错误,但在php.php-fpm和nginx的日志中均没有发现php的错误信息,将php.ini中的display_errors打开也没有php错误出现,在网站根目录下面写了个phpinfo可以正常运行,重启php依然如故,但重启了nginx之后网站访问就正常了. 原来wordpress升级的过程中因为比较耗时,造成php-

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

从供应商手中接手一个云平台(Windwos Azure)上的MySQL数据库,登录数据库时遇到错误: $mysql -uroot -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 检查配置文件/etc/my.cnf发现供应商修改了mysql数据库的数据存储目录,另外mysql.sock文件位置也变更为了/

mysql Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’

linux 环境下.所有数据库以及用户信息的存放位置可以在(vim /etc/my.cnf)查看[datadir=/usr/local/mysql_data ]. 读取不到数据库信息(原因:移动datadir过程中权限也改变了[chown mysql:mysql -R datadir]) ,datadir是你的存放路径.    代码如下 复制代码 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/va

Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’

   mysql 突然访问不了,登上服务器发现,mysql进程不见了.            错误:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)       发现是权限问题导致的.           改变权限 #chown -R mysql:mysql /var/lib/mysql            [root@localhost

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (

mysql启动成功 service mysqld start  mysql is OK mysql登录错误 : [root@localhost ~]# mysql -uroot -p123456ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 解决: vim /etc/my.cnf 找到 socket路径 scoket=/tmp/mysql.

connection to dat Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

[root@t1 ~]# tail /tmp/zabbix_server.log  23392:20160303:131022.598 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)  23392:20160303:131022.598 Database is down.