在我的 php 应用程序中,我恢复 db2 数据库。它工作正常,但这里有一个巨大的 2.9GB,最后是500 - Internal Server Error
.
我使用 exec() 从 .php - cp、db2 等运行 unix shell 命令。从 firefox 或 ruby 脚本运行时会发生相同的错误。
我必须先复制备份映像文件,这需要几分钟的时间。然后我调用 db2 来恢复图像。对于这个特定的数据库,php 进程结束时出现上述错误。然后我可以在错误日志文件中找到它
2012-08-02 10:25:18: (mod_fastcgi.c.2566) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:9090
2012-08-02 10:25:18: (mod_fastcgi.c.3352) response not received, request sent: 2758 on socket: tcp:127.0.0.1:9090 for /wrational/tools/rationalTest.php?mode=restore&database=RATIONAL&from_database=dbb&dbbackuptype=weekly, closing connection
我都设置了default_socket_timeout
and max_execution_time
到 php.ini 中的 5660 并确认它是由phpinfo()
但看起来没有帮助。
知道我怎样才能让这个发挥作用吗?
update
看起来40分钟后就死了。
access.log 文件中的相应行如下所示
"GET /rational/tools/rationalTest.php?mode=restore&from_database=dbb&dbbackuptype=weekly HTTP/1.1" 500 369 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20100101 Firefox/11.0"
看起来 php-fpm.ini 中的 request_terminate_timeout 选项引起了麻烦。时间定为30分钟。我把它改成了 0,到目前为止看起来还不错。但需要做更多测试。
; The timeout for serving a single request after which the worker process will
; be killed. This option should be used when the 'max_execution_time' ini option
; does not stop script execution for some reason. A value of '0' means 'off'.
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
; Default Value: 0
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)