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

Objects are not cleaned up #78

Closed
orgads opened this issue Jul 28, 2019 · 9 comments · Fixed by #203
Closed

Objects are not cleaned up #78

orgads opened this issue Jul 28, 2019 · 9 comments · Fixed by #203
Assignees
Labels
question Further information is requested

Comments

@orgads
Copy link
Contributor

orgads commented Jul 28, 2019

When running a load test, I notice that sockets and most objects remain and never get cleaned up.

I'm using a mock server that accepts websocket connections, and simulates cognitive services responses.

I start the sessions with recognizer.startContinuousRecognitionAsync(), and stop them after a while by calling recognizer.close().

Memory consumption increases constantly at a high rate (about 8-10MB/s when the session rate is 20/s).

Using Google Chrome inspector, I see that sockets and many other objects remain alive long after sessions are terminated.

@rhurey
Copy link
Member

rhurey commented Jul 30, 2019

That's unexpected. I'll put an item into our work queue to dig in deeper.

What if you call stopContinuousRecognitionAsync() instead of close()?

@orgads
Copy link
Contributor Author

orgads commented Jun 1, 2020

Hi,

Sorry for the (very) late response.

We checked it now, and it doesn't seem to improve.

@orgads
Copy link
Contributor Author

orgads commented Jun 3, 2020

@rhurey?

@oscholz
Copy link

oscholz commented Jun 17, 2020

@orgads, thank you for your follow up. We've added this to our backlog, and will update this issue when we know more. For the time being, we will close this issue, but we'll continue to track this on our backlog. If there is any urgency to this, please reactivate, and tell us what this is blocking.
Once we resolve the backlog item, we will update this ticket to let you know what the resolution was.

@oscholz oscholz closed this as completed Jun 17, 2020
@orgads
Copy link
Contributor Author

orgads commented Jun 17, 2020

Because of this issue we just can't use the official package, and we stick with an old implementation of ms-bing-speech-service with several patches.

We do want to use this package, but until this is solved, it will crash every few minutes on load runs, so obviously this blocks us.

@glharper
Copy link
Member

glharper commented Jul 6, 2020

@orgads Would you happen to still have the mock server with fake cog. service responses available to pass on so that I could take a look at this?

@oscholz oscholz reopened this Jul 6, 2020
@oscholz oscholz added the question Further information is requested label Jul 6, 2020
@orgads
Copy link
Contributor Author

orgads commented Jul 7, 2020

@orgads
Copy link
Contributor Author

orgads commented Jul 7, 2020

@oscholz @glharper ^

glharper added a commit that referenced this issue Jul 7, 2020
glharper added a commit that referenced this issue Jul 9, 2020
* Resolve #78

* Better re-init of privStreamBuffer, manage streamBuffer size on the fly

* Handle privStreamBuffer when reading ends, not on close

* Remove support for concurrent readers attaching to single stream
@glharper
Copy link
Member

@orgads Thank you for taking the time to write this up and help us out. We found and fixed a rather large memory leak, and the fix will be in our next release, 1.13. Much appreciated! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants