serverless-sentry-plugin: Sentry: Error uploading sourcemap file - Error: connect EADDRNOTAVAIL 35.188.42.15:443 - Local
Hi,
A few days from now we started to get this error on our pipelines:
Error ---------------------------------------------------
Error: Sentry: Error uploading sourcemap file - Error: connect EADDRNOTAVAIL 35.188.42.15:443 - Local (172.17.0.2:0)
at SentryPlugin.<anonymous> (/builds/services/node_modules/serverless-sentry/dist/index.js:603:31)
at step (/builds/services/node_modules/serverless-sentry/dist/index.js:44:23)
at Object.throw (/builds/services/node_modules/serverless-sentry/dist/index.js:25:53)
at rejected (/builds/services/node_modules/serverless-sentry/dist/index.js:17:65)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: linux
Node Version: 14.19.3
Framework Version: 2.72.3 (local)
Plugin Version: 5.5.4
SDK Version: 4.3.2
Components Version: 3.18.2
This is what our dependencies look like at the moment:
"@sentry/integrations": "^7.2.0",
"@sentry/node": "^7.2.0",
"serverless-sentry-lib": "^2.5.0",
"serverless-sentry": "^2.5.0",
We even tried to disable this functionality by adding the environment variable SENTRY_SOURCEMAPS
or adding the custom config:
sentry:
sourceMaps: false
But it runs regardless and ignores the flag. Do you have any idea what is happening and how to work around this?
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 27 (8 by maintainers)
I’m literally on a plane right now but should have a quick fix in a bit.
Just an update on my side. We found out a few other ways @sentry recommends for source map upload and we ended up using https://github.com/getsentry/sentry-webpack-plugin which also uploads the source maps to their service and it worked nicely for us. 👍
Please give 2.5.3 a shot whenever you have the chance. I increased it to 50 parallel uploads which matches the default the AWS JavaScript SDK uses as well: https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-configuring-maxsockets.html
So, this should be a sensible default. Otherwise we can still add a configuration setting or think about more complex improvements for the next update.
If you want I can try to cook a PR adding a new option where I can configure the number of files to be uploaded at the same time. I think we can easily increase it to 10 or 20.
Using Keep-Alive Agent inside the super-agent library might also speed up requests considerably.
I have another update 2.5.2. Can you give it a try? It will upload 5 in parallel which should not impact your performance anymore. 10, 20, 50 really shouldn’t make a noticeable difference, but feel free to adjust it and try it out if you notice something. I’m open to any changes. Again, this is fully untested 🙄
The best would be to upload like 3 to 5 simultaneously for best performance. 50-100 parallel connections are a lot. But I currently lack the time and ability to test this properly, so I went for the quickest fix. It’s slower but should work regardless of how large the project is and how many artifacts it has to upload.
Maybe we should do this in batches instead of calling all of them in parallel or in series… creating batches of 50-100 requests might fix the issue. In our case it would take ages to submit all files I suppose.