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).

+3
xml php nginx error-handling


source to share


No one has answered this question yet

Check out similar questions:

1624
How do I get PHP errors?
47
nginx 502 bad gateway
sixteen
Nginx + PHP-FPM 502 Bad Gateway
nine
NGNX + PHP5-FPM segfaults under high load
3
Laravel 4: 502 Bad Gateway with Nginx in only one view
3
PHP 5.4 + Nginx + APC = 502 Bad Gateway?
2
502 Bad nginx gateway with PHP-FPM under high load
1
Nginx always returns 502 with Homestead
0
LibMemcached crash php-fpm
0
php-fpm + nginx issue: variable too big cause 502 error



All Articles
Loading...
X
Show
Funny
Dev
Pics