我有一个Nginx服务器,其唯一目的是读取XML并将其放入数据库中。
如果文件很小,那么说100MB一切都很好。但是如果我试图SimpleXMLELement
一个大约700MB的文件,我会收到502 Bad Gateway警告。
我读了这个问题并摆弄了下面的设置,但它还没有帮助。我的缓冲区应该更大吗?如:700M或什么?
nginx.conf(在http {}中):
fastcgi_buffers 128 128k;
fastcgi_buffer_size 128k;
fastcgi_connect_timeout 3000;
fastcgi_send_timeout 3000;
fastcgi_read_timeout 3000;
我的php脚本中有ini_set("memory_limit", "-1");
,php-fpm.conf中有php_admin_value[memory_limit] = 2042M
[03-Jul-2015 11:53:44] WARNING: [pool www] child 6327 exited on signal 9 (SIGKILL) after 19.047513 seconds from start
[03-Jul-2015 12:16:12] WARNING: [pool www] child 6518 exited on signal 9 (SIGKILL) after 23.669892 seconds from start
[03-Jul-2015 12:22:13] NOTICE: configuration file /opt/nginxstack-1.8.0-0/php/etc/php-fpm.conf test is successful
[03-Jul-2015 12:23:35] WARNING: [pool www] child 7089 exited on signal 9 (SIGKILL) after 23.245077 seconds from start
(更改后我重新启动服务器)。