Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pool resources not released on time? #62

Closed
aadil058 opened this issue Aug 3, 2021 · 4 comments · Fixed by #72
Closed

Pool resources not released on time? #62

aadil058 opened this issue Aug 3, 2021 · 4 comments · Fixed by #72
Assignees
Labels
status: done This issue is considered resolved. type: bug This issue reports a bug. type: performance This issue reports a problem with performance.

Comments

@aadil058
Copy link

aadil058 commented Aug 3, 2021

I had to increase pool resources from 10 to 100 to be able to send messages. With the default 10 resources limit .publish() kept waiting and waiting for resources to release forever.

SDK version 4.0.0.beta-1

@are are self-assigned this Aug 4, 2021
@are are added status: accepted This issue is accepted as valid, but it's not being worked on yet. type: bug This issue reports a bug. type: performance This issue reports a problem with performance. labels Aug 4, 2021
@are
Copy link
Contributor

are commented Aug 4, 2021

Hi! This certainly seems weird - the resources should be recycled quite well in most cases. Can you let us know the circumstances where the pool gets exhausted? There may be a leak in the code that prevents pool resources from being released.

Is this happening after the app runs for a long time? Or after a lot of exceptions?

@aadil058
Copy link
Author

aadil058 commented Aug 4, 2021

Hi, I got 9 to 10 timeouts/exceptions in the logs but couldn't figure out from where they were originating. Now, I think they were coming from the SDK. Also, the app wasn't running for a long time. Sometimes I was able to send messages and sometimes I was not (.publish kept waiting forever). If I was not able to send messages I had to restart the app if I were lucky I was able to send the messags.

One thing that I would like to mention is I have some listeners/subscriptions (maybe 10 to 15) set up to actively listen for incoming messages (Note: they are active all the time). Maybe I have too many subscriptions at the same time is causing this behavior?

I think if the network job is canceled abruptly or the response code is not a success (i.e., 200 - 299) then resources are not released. Am I right or missing something?

@are
Copy link
Contributor

are commented Aug 4, 2021

Subscriptions/listeners don't take up resources from resource pool, but I think you may be up to something with that last sentence. I'll test this and make sure that resources are released properly on job failure. Thanks for reporting this issue to us!

@are are added status: in progress This issue is being worked on. and removed status: accepted This issue is accepted as valid, but it's not being worked on yet. labels Nov 9, 2021
@are are added this to the 4.0.0 Stable Release milestone Nov 9, 2021
@github-actions
Copy link

@aadil058 this issue is addressed in v4.0.0

@github-actions github-actions bot added status: done This issue is considered resolved. and removed status: in progress This issue is being worked on. labels Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: done This issue is considered resolved. type: bug This issue reports a bug. type: performance This issue reports a problem with performance.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants