getsentry/sentry-cli

Consider to provide SENTRY_HTTP_RETRY_DELAY

Closed this issue · 5 comments

I have an issue which is related with uploading mapping.txt file,
And reported it at getsentry/sentry-android-gradle-plugin#764
Then, I got answer that SENTRY_HTTP_MAX_RETRIES env would solve my problem.

After I set SENTRY_HTTP_MAX_RETRIES=25, but I got same issue.
In my experience, when perform :app:uploadSentryProguardMappingsRelease task multiple in this case, upload task can be succeeded.

The difference with increasing the SENTRY_HTTP_MAX_RETRIES value is that it takes quite a bit of time to perform the gradle task.
In sentry-cli upload, if you can give the upload retry a time interval, I think it will provide a similar effect.

@ganadist how exactly would being able to configure the retry delay help in your situation? I believe we already have an exponential backoff for retries

In my case, mapping.txt file size is about 800Mb or larger and retry value is set as 25. (I heard that retry value would be enough when it is 10 from Sentry engineer)

And when try again to perform :app:uploadSentryProguardMappingsRelease task several times in manually, I can observe that uploading task can be succeeded.

And duration to perform :app:uploadSentryProguardMappingsRelease is about 3-4 minutes.

It looks max backoff value is 5sec only in sentry-cli.
https://github.com/getsentry/sentry-cli/blob/master/src/constants.rs#L39

Is it possible to provide increased backoff value on sentry cli?

Is it possible to provide increased backoff value on sentry cli?

Currently this is not possible, but we could add this feature.

However, to be clear, the retry occurs after the upload has already failed. So, even though it takes 3-4 minutes to perform the upload, we would still wait 5 seconds after the failure to retry with the current max retry value. We would not retry already 5 seconds after starting the upload. So, I am unsure whether this would fix your problem.

Perhaps, you could try adding a manual retry to your script? Or is the Sentry CLI being called by the Sentry Gradle plugin?

@ganadist How large are the mapping.txt files that you are trying to upload? If they are large, you might be able to fix this problem by setting the SENTRY_EXPERIMENTAL_PROGUARD_CHUNK_UPLOAD environment variable to 1. This will enable an experimental feature, which changes the mechanism for uploading the mapping file to something which we expect to be more reliable for large files.

Closing due to inactivity. If this is still a problem, please reopen this issue, or open a new issue referencing this issue.