All-Hands-AI / OpenHands

🙌 OpenHands: Code Less, Make More
https://all-hands.dev
MIT License
37.37k stars 4.23k forks source link

mitigate memory leak #5152

Closed rbren closed 4 days ago

rbren commented 5 days ago

End-user friendly description of the problem this fixes or functionality that this introduces


Give a summary of what the PR does, explaining any non-trivial design decisions

I still haven't tracked down the source of the memory leak, but the repro is something like:

You'll see mem usage jump by ~12MB on each refresh.

This seems to cut down on most of the leakage, but there's probably a separate leak somewhere


Link of any specific issues this addresses


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:9cab1e9-nikolaik   --name openhands-app-9cab1e9   docker.all-hands.dev/all-hands-ai/openhands:9cab1e9