I am running an app with react and node that uploads csv files via react, node then converts them to json, processes the data and finally it outputs an excel file using npm exceljs, the whole thing takes a little time on my local environment but it works well.
But when I put it on production I get a 502 error when it's processing the excel file.
There is no much information other than 502, on the nginx error log I get:
`*271 upstream prematurely closed connection while reading response header from upstream`
I got this on the server config
nginx.conf
sendfile on;
keepalive_timeout 65;
client_max_body_size 12000M;
client_body_buffer_size 1024k;
client_header_timeout 3000;
client_body_timeout 3000;
fastcgi_read_timeout 3000;
fastcgi_buffers 8 1024k;
fastcgi_buffer_size 1024k;
fastcgi_connect_timeout 3000;
fastcgi_send_timeout 3000;
proxy_buffer_size 1024k;
proxy_buffers 4 1024k;
proxy_busy_buffers_size 1024k;
app.conf
location /opSizing/process {
proxy_pass http://localhost:5006/opSizing/process;
}
