NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
22.41k stars 2.6k forks source link

Files uploaded to a server behind NPM fail when larger than 40kb #3522

Open d3athrow opened 8 months ago

d3athrow commented 8 months ago

Checklist

Describe the bug

File uploads over a certain size handled by PHP result in npm returning either a 502 or 504 error.

Nginx Proxy Manager Version

2.11.1

To Reproduce Steps to reproduce the behavior:

  1. Go to https://ss13.moe/uploadtest
  2. upload an image larger than 40kb
  3. wait 5 minutes and receive 504 or 502

Expected behavior

  1. Upload the image
  2. receive success message

Operating System

npm is on debian upload test is hosted by apache on winserver2022 however the issue occurs regardless of OS the webserver is hosted on.

Additional context

uploads work fine if the reverse proxy is bypassed. configuration options for request timeouts and upload/body size are set higher than what was in production for debugging and resulted in no change.

example successful upload log from npm

[31/Jan/2024:11:20:25 +0000] - 200 200 - POST http ss13.moe "/uploadtest/" [Client [ip]] [Length 37] [Gzip -] [Sent-to 10.0.0.177] "ShareX/15.0.0" "-"

example error log from npm

2024/01/31 11:25:39 [error] 312417#312417: *510967 upstream timed out (110: Connection timed out) while sending request to upstream, client: [ip], server: ss13.moe, request: "POST /uploadtest/ HTTP/1.1", upstream: "http://10.0.0.177:80/uploadtest/", host: "ss13.moe"
2024/01/31 11:30:40 [error] 312417#312417: *510967 upstream timed out (110: Connection timed out) while sending request to upstream, client: [ip], server:ss13.moe, request: "POST /uploadtest/ HTTP/1.1", upstream: "http://10.0.0.177:80/uploadtest/", host: "ss13.moe"

access log from npm

[31/Jan/2024:11:25:39 +0000] - 504 504 - POST http ss13.moe "/uploadtest/" [Client [ip]] [Length 164] [Gzip -] [Sent-to 10.0.0.177] "ShareX/15.0.0" "-"
[31/Jan/2024:11:30:40 +0000] - 504 504 - POST http ss13.moe "/uploadtest/" [Client [ip]] [Length 164] [Gzip -] [Sent-to 10.0.0.177] "ShareX/15.0.0" "-"
robsontenorio commented 6 months ago

@d3athrow have you solved it ?

d3athrow commented 6 months ago

nope