Skip to main content

Why do I get a 503 error when uploading debug files with cURL?

Issue

I am trying to upload debug symbols using curl instead of sentry-cli, but it does not work. I get a 503 error with the following response:

upstream connect error or disconnect/reset before headers. reset reason: connection termination

Applies To

  • All SaaS customers

  • Debug Files

  • API

Resolution

Yes, this happens because the debug files upload API expects a single ZIP archive sent as multipart/form-data. If you upload raw, unzipped files, the request fails with the 503 upstream connect error.

To upload debug files with cURL:

  1. Compress your debug files into a single .zip archive.

  2. Upload the archive as multipart form data to your region-specific endpoint, using the file field:

curl -X POST 'https://us.sentry.io/api/0/projects/<org>/<project>/files/dsyms/' \
-H 'Authorization: Bearer <auth-token>' \
-F '[email protected]'

Replace us.sentry.io with your region's domain, for example de.sentry.io.

For all options, see the debug files upload documentation.

Did this answer your question?