Comments (12)
I've possibly been able to resolve this by pinning the @smithy/node-http-handler package (which is used internally by @AWS-SDK) to version 3.0.1
With this, I have been able to upgrade the @AWS-SDK packages to version ^3.600.0. This is not a long-term solution but provides a bridging solution until the root cause is addressed.
So, in short, add the following to your dependencies in your package.json
file:
"@smithy/node-http-handler": "3.0.1",
I've deployed this change into our systems and will monitor memory usage over the next few days, but the warning no longer presents.
I hope this is helpful.
from sqs-consumer.
After reviewing the impact of the above fix, it does appear that the leak has been resolved, so I'm happy to recommend it as a temporary solution until a more permanent fix is available.
from sqs-consumer.
Hey, thanks for raising an issue.
3.6 of the sdk would be a major version, we don't naturally support major version releases as they come out as they come with breaking changes like this.
It would be something that we'd have to look at for our next major/minor release ourselves.
I am rather busy at the moment though, so I would suggest staying on 3.5 for a little while longer.
We'd be happy to take a pr though if this is an issue for anyone.
from sqs-consumer.
Hej, thanks for the quick response.
I can reproduce this issue just upgrading to 3.582.0 which if I understood correctly is part of 3.5, right? 🤔
I can look into it and open a PR. My fix during the test was very simple: passing new AbortController
per request. Do you see any issue with that?
from sqs-consumer.
Ahh sorry, I thought you said it was 3.6, the pr you linked also seems like a breaking change to me.
If I have time I might be able to look into it. In terms of a possible solution, that might be if, I've not looked too deep though.
from sqs-consumer.
I'm having the same issue and can confirm that this is not just a warning but continues to leak until the process is out of memory.
from sqs-consumer.
If I have spare time this week I'll take a look, unfortunately, until then, I'd have to ask that everyone bares with.
If anyone has the time themselves to look, that'd be super helpful, but if not, you'll have to wait on me. Unfortunately, it has come at a particularly busy time for the BBC.
from sqs-consumer.
Awesome! So it is a change in the next version that causes the issue, that makes it easier to figure out what's going on, thanks!
(This one: https://github.com/smithy-lang/smithy-typescript/releases/tag/%40smithy/node-http-handler%403.1.0 which is the change mentioned at the top, spot on!)
from sqs-consumer.
On further research, this may be because the Aborts are not automatically being cleaned up, there's an old Node issue around this: nodejs/node#46525
Possibly because smithy is adding event listeners: https://github.com/smithy-lang/smithy-typescript/pull/1308/files#diff-98216b22e6b39a1cd6f2ab013304d4964152b554c4ad8fee4182a961b42285d8R192 but not removing them?
Update: I've opened an issue around this here: smithy-lang/smithy-typescript#1318
from sqs-consumer.
Update on this, I have published 11.0.0-canary.1
with the latest version of the aws-sdk to test this with that new version and I've made a new example that sets up Docker with localstack for a truer test: https://github.com/bbc/sqs-consumer-starter/tree/main/examples/docker
With this, I have replicated the issue:
Still trying to figure out the best way to resolve it though.
from sqs-consumer.
@erichkuba Still I have the issue.
Node version : 18.20.2
"@aws-sdk/client-sqs": "^3.600.0",
"@ssut/nestjs-sqs": "^2.1.0",
I tried with @smithy/node-http-handler package and still the issue persists.
from sqs-consumer.
Hey, I'm still waiting on a response from AWS on the issue I raised above.
Outside of that, the current suggestion is to do what was described here: #500 (comment), or pin your AWS SDK version to before this change.
Outside of that, if anyone has any ideas for how it might be resolved in SQS Consumer, feel free to open a PR, we are in an election period at the moment, so I'm strapped for time.
Could we avoid adding "me too" comments though please? This just fills up the thread and makes it unreadable for other people coming in.
from sqs-consumer.
Related Issues (20)
- [Bug]: SQS receive message failed: Could not load credentials from any providers HOT 2
- [Bug]: Undocumented breaking change - acknowledgment to handleMessage HOT 7
- v5.8.0 if send message to sqs queue on other pc HOT 2
- [Bug]: ApproximateReceiveCount is not part of QueueAttributeName HOT 4
- The automated release is failing 🚨 HOT 1
- [Bug]: Version 8.1.5 of this library incompatible with @aws-sdk/client-sqs version 3.507.0 HOT 5
- Add a link to the docs at the top of the readme HOT 2
- Remove AWS SDK V2 Note
- Upgrade p-event to v6 HOT 1
- Upgrade chai to v5 HOT 1
- Remove the `handler_processing` debugger HOT 2
- [Bug]: CredentialsProviderError is not treated as a connection error HOT 2
- [Bug]: SQS receive message failed: connect ETIMEDOUT <ip>:443 every few hours HOT 4
- [Bug]: When consumer fails to react to SQS instant retry occurs HOT 3
- [Bug]: attributeNames does not support MessageSystemAttributeName HOT 3
- The automated release is failing 🚨 HOT 1
- [Bug]: When consumer fails to connect to SQS due to connectivity instant retry occurs HOT 2
- v10 isn't loading the type file correctly HOT 12
- [Feature Request]: Enhance SQSError with AWS error $response object for Better Debugging HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqs-consumer.