addons icon indicating copy to clipboard operation
addons copied to clipboard

[Bug]: Local addons-server Throws 502 On Larger Files

Open chrstinalin opened this issue 1 year ago • 2 comments

What happened?

In a local environment, uploading any file >5mb will cause a nginx 502 and only fixed with a make down/up. This doesn’t happen on dev — add-ons up to 200mb can be uploaded successfully and anything larger errors as expected.

What did you expect to happen?

Files up to the expected limit (when >5mb) are uploaded successfully and without error.

Is there an existing issue for this?

  • [X] I have searched the existing issues

┆Issue is synchronized with this Jira Task

chrstinalin avatar Sep 18 '24 14:09 chrstinalin

Note that there are 2 issues here:

  • client_max_body_size should be set to 200m or so (letting us upload files that are 199.9 MB, if we account for the rest of the request body)
  • the weird proxy thing we do where requests go through addons-frontend should either be fixed or removed completely (while keeping addons-frontend pages working locally)

diox avatar Sep 20 '24 10:09 diox

We could also try to fix the proxy in addons-frontend - the error seems to be coming from there. But if it's not an easy fix we should probably stop doing that entirely like suggested above.

diox avatar Sep 24 '24 14:09 diox

Expanding on https://github.com/mozilla/addons/issues/15029#issuecomment-2363360671

  • client_max_body_size being too low causes a 413
  • Proxy causes a 502

chrstinalin avatar Sep 26 '24 13:09 chrstinalin