`

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

 
阅读更多

在ubuntu12.04中安装配置LNMP时 出现在php5-fpm的错误

2013/04/26 04:01:05 [crit] 6119#0: *4 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 159.53.110.141, server: 216.238.88.42, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "216.238.88.42:9090


nginx中是这样配置的

location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
#
# # With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}

我个人的配置是想用sock的方法 毕竟sock方式对于高并发来说 还是比使用cgi方式好的

问题其实出现在 fastcgi_pass得配置上面。在ubuntu 12.10安装了php5-fpm之后。我们可以去

/etc/php5/fpm/pool.d/www.conf


里面找到这样一段代码:

listen = 127.0.0.1:9000

在这上面代码的下面添加一行:

listen = /var/run/php5-fpm.sock


保存后启动php5-fpm

/etc/init.d/php5-fpm restart

这时就可以正常访问了


分享到:
评论

相关推荐

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

    connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporarily unavailable) 发现phpfpm的listen是unix sock方式运行的,问题可能出在php fpm上。php fpm配置文件里有backlog,backlog是linux服务器在...

    php-fpm.conf配置文件中文翻译注释

    - `listen = /run/php/php7.4-fpm.sock`:定义监听的套接字路径,通常用于Unix域套接字,或者`listen = 127.0.0.1:9000`用于TCP端口监听。 - `listen.owner = www-data`:监听套接字的所有者,通常为Web服务器的...

    php-7.0.27.tar.gz

    编译 ./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --bindir=/usr/local/php/bin --sbindir=/usr/local/php/sbin --includedir=/usr/local/php/include --libdir=/usr/local/php/lib/php --...

    解决php-fpm.service not found问题的办法

    前言 本文给大家详细介绍了解决php-fpm.service not found问题的相关内容,文中介绍的非常详细,下面来一起看看详细的介绍:...Failed to start php-fpm.service: Unit php-fpm.service not found. 提示 php-fpm.servi

    php-5.6.29.tar.gz

    编译 ./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --bindir=/usr/local/php/bin --sbindir=/usr/local/php/sbin --includedir=/usr/local/php/include --libdir=/usr/local/php/lib/php --...

    php-fpm-5.3.3-26.el6.x86_64.rpm

    php-fpm是个中间件,在需要php解释器来处理.php文本时会用到php-fpm。自从php5.3.3以后就将php-fpm集成在php内核中。PHP-FPM提供了更好的PHP进程管理方式,可以有效控制内存和进程、可以平滑重载PHP配置。 作者:...

    php-7.3.0.tar.gz

    ./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --bindir=/usr/local/php/bin --sbindir=/usr/local/php/sbin --includedir=/usr/local/php/include --libdir=/usr/local/php/lib/php --mandir=...

    php-fpm.rpm包

    - `php-fpm-5.4.16-42.el7.x86_64.rpm` 是PHP-FPM的具体版本安装包,版本号为5.4.16,适用于Red Hat Enterprise Linux 7(RHEL 7)系统的64位架构。安装这个包后,系统就能支持PHP-FPM服务。 - `php_scripts` 可能是...

    php-7.2.20.tar.gz

    编译 ./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --bindir=/usr/local/php/bin --sbindir=/usr/local/php/sbin --includedir=/usr/local/php/include --libdir=/usr/local/php/lib/php --...

    php-fpm.tar.gz

    解压完成后,如果是一个源码包,还需要通过`./configure`,`make`,`make install`等步骤来编译和安装。然而,由于这里提到的是通过yum进行安装,所以解压后应该直接可以使用`yum install`命令进行下一步操作。 在...

    php-5.6.37.tar.gz下载及php5.6源码安装说明

    useradd -c php-fpm-user -g www -M www # c和c++编译器 yum -y install -y gcc gcc-c++ # PHP扩展依赖 yum install -y libxml2-devel openssl-devel libcurl-devel libjpeg-devel libpng-devel libicu-devel ...

    php-7.1.29.tar.gz

    编译 ./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --bindir=/usr/local/php/bin --sbindir=/usr/local/php/sbin --includedir=/usr/local/php/include --libdir=/usr/local/php/lib/php --...

    Redhat 使用CentOS的yum源进行升级或软件安装

    # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # #...

    php-7.3.7.tar.gz

    编译 ./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --bindir=/usr/local/php/bin --sbindir=/usr/local/php/sbin --includedir=/usr/local/php/include --libdir=/usr/local/php/lib/php --...

    php-fpm.conf

    php-fpm.conf

    Dockerfile 安装php7.1镜像

    RUN ./configure \ --prefix=/usr/local/php \ --with-config-file-path=/usr/local/php/etc \ --with-gd \ --enable-pdo \ --with-openssl \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --enable...

    php7.3.33.tar.gz 源码安装包

    fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; } ``` 并启用PHP-FPM服务: ```bash sudo systemctl start php7.3-fpm sudo systemctl enable php7.3-fpm ``` ### 七、测试PHP安装 创建一个名为`info.php`的...

Global site tag (gtag.js) - Google Analytics