Sentry-cli: error: could not perform API request: http error: [55] Failed sending data to the peer

Created on 19 Aug 2016  路  9Comments  路  Source: getsentry/sentry-cli

The last question was not resolved,
Client log:
[INFO] sentrycli::api using token authentication
[INFO] sentrycli::api sending form data
error: could not perform API request: http error: [55] Failed sending data to the peer

Server log:
Invalid (too big) CONTENT_LENGTH. skip
"POST /api/0/projects/sentry/test/files/dsyms/ HTTP/1.1" 500 0 "-" "sentry-cli/0.18.0"

Most helpful comment

FWIW, the next sentry release (9.0.0) will contain a permanent server-side fix for this.

All 9 comments

Is this still happening?

Going to close this on inactivity.

For reference of ppl stumbling upon this issue while googling: This is expected behaviour, since the upload exceeds uwsgis maximum post size (20mb by default). You can change your sentry.conf.py to include 'limit-post': <number of bytes> in SENTRY_WEB_OPTIONS to adjust the maximum post size.

@ahti Does this assume you are running your own server?

@mcrawshaw Yes. I don't know how or whether this would occur/could be fixed on hosted Sentry.

This is what worked for me with a docker-compose setup:
change the Dockerfile to the newest sentry image (at my time it was 8.22-onbuild):

FROM sentry:8.22-onbuild

In sentry.conf.py change the SENTRY_WEB_OPTIONS to:

SENTRY_WEB_OPTIONS = {
    # 'workers': 3,  # the number of web workers
    'limit-post': 31457280  # in bytes ~ 30MB
}

Stop the containers: docker-compose stop
Run the upgrade: docker-compose run --rm web upgrade
Start the containers again: docker-compose up -d

If you are serving sentry behind a nginx proxy, you also need to add:
client_max_body_size 30m;
to your nginx.conf/sites-enabled where your site is served.

FWIW, the next sentry release (9.0.0) will contain a permanent server-side fix for this.

This is what worked for me with a docker-compose setup:
change the Dockerfile to the newest sentry image (at my time it was 8.22-onbuild):

FROM sentry:8.22-onbuild

In sentry.conf.py change the SENTRY_WEB_OPTIONS to:

SENTRY_WEB_OPTIONS = {
    # 'workers': 3,  # the number of web workers
    'lmit-post': 31457280  # in bytes ~ 30MB
}

Stop the containers: docker-compose stop
Run the upgrade: docker-compose run --rm web upgrade
Start the containers again: docker-compose up -d

If you are serving sentry behind a nginx proxy, you also need to add:
client_max_body_size 30m;
to your nginx.conf/sites-enabled where your site is served.

Just in case, the configuration mentioned above lmit-post, should be limit-post

@jan-auer
Has the issue fixed in version 9.0.0?

I has the self-hosted sentry(9.0.0), but found that also need set the sentry.conf.py to resolve the issue.

SENTRY_WEB_OPTIONS = {
    # 'workers': 3,  # the number of web workers
    'lmit-post': 31457280  # in bytes ~ 30MB
}

After set te max post size to 30M, occured the error [56]:

error: API request failed
  caused by: [56] Failure when receiving data from the peer

thx

Was this page helpful?
0 / 5 - 0 ratings