Open GwynethLlewelyn opened 2 years ago
Status: Still unresolved as of today...
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!
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.
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.