首页 > 解决方案 > Nginx response with bad gateway when fetching large data

问题描述

Im running a laravel application and fetching some json via ajax calls. There is a specific endpoint which returns about 14mb of data which fails on my production machine (502 Bad Gateway) which is configured using nginx and php-fpm. Here's an entry in the nginx error log:

[error] 104533#104533: *14 recv() failed (104: Connection reset by peer) while reading response header from upstream

I have other similar endpoints which return about 8mb of data which work just fine so not sure if this is a setting i need to configure in php or nginx?

标签: phpnginx

解决方案


推荐阅读