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

Massive memory leak! #8

Open
GwynethLlewelyn opened this issue Jan 29, 2022 · 4 comments
Open

Massive memory leak! #8

GwynethLlewelyn opened this issue Jan 29, 2022 · 4 comments

Comments

@GwynethLlewelyn
Copy link
Owner

Leaving this running for several hours will generate a major memory leak. Something is clearly missing!

This needs to be addressed before the package is ready to be shipped to NuGet.

@GwynethLlewelyn
Copy link
Owner Author

Status: Still unresolved as of today...

@GwynethLlewelyn
Copy link
Owner Author

There is a good chance that this is related to an issue of the underlying LibreMetaverse version. I think it has to do with 'new' caps errors sent by LL which LibreMetaverse does not recognise, and, by default, not knowing if they're errors or not, keeps the communications open.

However, it's clear that the SL grid is sending messages with 'InternalServerError' inside its XML container. According to what I've read, it's expected that LL's caps servers will return an 'unknown' error to tell the client that it should close the connection. Previously, it seems that SL would mostly use 404 for the error, but, because it's not, strictly speaking, a client issue, but a server issue, it looks like LL now prefers to send back a 500 when it wishes the client to close the connection.

To test this theory, I need to learn how to use the dotnet CLI to work on a fork of LibreMetaverse while still continuing to work nicely with everything else, until, eventually, a forthcoming PR to the LibreMetaverse maintainers might be accepted and the NuGet repository for it properly updated. But I'm not going to hold my breath that this happens 'soon', thus the need to experiment a bit first!

@GwynethLlewelyn
Copy link
Owner Author

A short update: I have submitted a PR to the LibreMetaverse project. It doesn't 'fix' the memory leak, but makes it a bit more manageable.

According to my (current) tests, which are not very scientific neither rigorous, it seems that RESTbot will consume around 5 to 10 MBytes per managed agent. There will be some fluctuations over time, but, thankfully, the Garbage Collector seems to keep these in check. It's better than nothing.

@GwynethLlewelyn
Copy link
Owner Author

Update: there are no updates.

More exactly: there hasn't been a fix for this, and the LibreMetaverse version is now extremely outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant