Sourcemap upload failing when file size more than 20MB

onPremise version 9.0
sentry-cli version 1.35.4
Want to upload three files as below:

-rw-r–r-- 1 yun staff 455051 9 6 11:17 lib.ff1a3865.js
-rw-r–r-- 1 yun staff 25960816 9 6 14:26 main.c30416bb.js
-rw-r–r-- 1 yun staff 39600768 9 6 11:17 main.c30416bb.js.map

run below command

sentry-cli releases files 0.0.1 upload-sourcemaps --url-prefix http://sentry.local:9000/static/js ./build/static/js

> Analyzing 3 sources
>Adding source map references
>Uploading source maps for release 0.0.1
error: API request failed
caused by: sentry reported an error: unknown error (http status: 502)

with --log-level=debug config can see

[INFO] sentry_cli::api < HTTP/1.1 502 Bad Gateway
[INFO] sentry_cli::api < Server: nginx
[INFO] sentry_cli::api < Date: Thu, 06 Sep 2018 09:25:12 GMT
[INFO] sentry_cli::api < Content-Type: text/html
[INFO] sentry_cli::api < Content-Length: 166
[INFO] sentry_cli::api < Connection: keep-alive
[INFO] sentry_cli::api response: 502
[INFO] sentry_cli::api body:
<head>502 Bad Gateway
<body bgcolor=“white”>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>

show the docker log

docker logs -f -t --tail 10 sentry_web_1

2018-09-06T08:56:41.525175435Z Invalid (too big) CONTENT_LENGTH. skip.
2018-09-06T08:56:41.525899090Z 10.139.48.188 - - [06/Sep/2018:08:56:41 +0000] “POST /api/0/projects/yunzhanghu/yjj-test/releases/0.0.1/files/ HTTP/1.0” 500 0 “-” “-”

I have solved this issue. As below:

--- a/sentry.conf.py
+++ b/sentry.conf.py
@@ -247,6 +247,7 @@ SENTRY_WEB_HOST = '0.0.0.0'
 SENTRY_WEB_PORT = 9000
 SENTRY_WEB_OPTIONS = {
     # 'workers': 3,  # the number of web workers
+    'limit-post': 1024 * 1024 * 1024 * 2
 }

Refer: https://github.com/getsentry/onpremise/issues/44

1 Like