VPS侦探论坛

 找回密码
 注册
查看: 5310|回复: 3

php 502 错误 fpm_unix_init_main(), line 284: getrlimit(nofile): max:4096, cur:102

[复制链接]
发表于 2012-3-31 16:49:21 | 显示全部楼层 |阅读模式

看了置顶的帖子:https://bbs.vpser.net/thread-1144-1-1.html

以及: https://bbs.vpser.net/thread-1654-1-1.html

改动了
rlimit_files

etc/security/limits.conf

中的相应值等.  还是502

php-fpm.log 记录如下:


Mar 31 16:26:22.105823 [NOTICE] fpm_unix_init_main(), line 284: getrlimit(nofile): max:4096, cur:1024
Mar 31 16:26:22.106224 [NOTICE] fpm_event_init_main(), line 88: libevent: using epoll
Mar 31 16:26:22.106283 [NOTICE] fpm_init(), line 52: fpm is running, pid 1422
Mar 31 16:26:22.107902 [NOTICE] fpm_children_make(), line 352: child 1423 (pool default) started
Mar 31 16:26:22.114404 [NOTICE] fpm_children_make(), line 352: child 1424 (pool default) started
Mar 31 16:26:22.122094 [NOTICE] fpm_children_make(), line 352: child 1427 (pool default) started
Mar 31 16:26:22.123683 [NOTICE] fpm_children_make(), line 352: child 1428 (pool default) started
Mar 31 16:26:22.139883 [NOTICE] fpm_children_make(), line 352: child 1429 (pool default) started
Mar 31 16:26:22.141541 [NOTICE] fpm_children_make(), line 352: child 1436 (pool default) started
Mar 31 16:26:22.142997 [NOTICE] fpm_children_make(), line 352: child 1437 (pool default) started
Mar 31 16:26:22.154945 [NOTICE] fpm_children_make(), line 352: child 1441 (pool default) started
Mar 31 16:26:22.163891 [NOTICE] fpm_children_make(), line 352: child 1445 (pool default) started
Mar 31 16:26:22.165464 [NOTICE] fpm_children_make(), line 352: child 1446 (pool default) started
Mar 31 16:26:22.176319 [NOTICE] fpm_children_make(), line 352: child 1451 (pool default) started
Mar 31 16:26:22.177905 [NOTICE] fpm_children_make(), line 352: child 1452 (pool default) started
Mar 31 16:26:22.189017 [NOTICE] fpm_children_make(), line 352: child 1458 (pool default) started
Mar 31 16:26:22.190502 [NOTICE] fpm_children_make(), line 352: child 1459 (pool default) started
Mar 31 16:26:22.201174 [NOTICE] fpm_children_make(), line 352: child 1463 (pool default) started
Mar 31 16:26:22.209161 [NOTICE] fpm_children_make(), line 352: child 1467 (pool default) started
Mar 31 16:26:22.222719 [NOTICE] fpm_children_make(), line 352: child 1468 (pool default) started
Mar 31 16:26:22.224314 [NOTICE] fpm_children_make(), line 352: child 1475 (pool default) started
Mar 31 16:26:22.225791 [NOTICE] fpm_children_make(), line 352: child 1476 (pool default) started
Mar 31 16:26:22.241663 [NOTICE] fpm_children_make(), line 352: child 1477 (pool default) started
Mar 31 16:26:22.241727 [NOTICE] fpm_event_loop(), line 107: libevent: entering main loop



如何解决呢?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-3-31 16:52:46 | 显示全部楼层


把nginx.conf 中的

fastcgi_pass  unix:/tmp/php-cgi.sock;

改为

fastcgi_pass  127.0.0.1:9000;

后  正常了,     这是为什么呢?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2012-3-31 17:22:28 | 显示全部楼层

回复 2# 的帖子


那肯定你php-fpm里也是以端口运行的,而不是以sock运行的
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-4-1 00:48:09 | 显示全部楼层



以sock方式运行有什么好处呢?

如何能让php-fpm以 sock方式运行?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-17 01:28 , Processed in 0.026367 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表