Nginx error 502 Bad Gateway. How big should my buffer be?
I have an Nginx server whose sole purpose is to read XML and put it into a database.
If the files are small, say 100 MB, everything works well. But if I'm trying a SimpleXMLELement
file that is about 700MB in size, I get a 502 Bad Gateway warning.
I read this issue and staggered with the settings below but haven't helped yet. Should my buffers be larger? Like in: 700M or something?
nginx.conf (in http {}):
fastcgi_buffers 128 128k;
fastcgi_buffer_size 128k;
fastcgi_connect_timeout 3000;
fastcgi_send_timeout 3000;
fastcgi_read_timeout 3000;
I have a ini_set("memory_limit", "-1");
script in PHP and php_admin_value[memory_limit] = 2042M
in php-fpm.conf
[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
(After the changes I restart the server).
source to share
No one has answered this question yet
Check out similar questions: