srcdslab / torchlight

Bot for source engine games with a lot of commands
3 stars 4 forks source link

bug: Memory leak #55

Open Rushaway opened 5 months ago

Rushaway commented 5 months ago

Build in use: 55655cc Depending the usage from clients, torchlight lead to a memory leak happens earlier. Already the second time it occurs. First time was after 37d of uptime, second time was after 23 days. image

Rushaway commented 2 months ago

Ended reaching 1.3Go ram usage and froze the container. image

maxime1907 commented 2 months ago

it seems to be related to some caching issue, i have done some profiling and memory only goes up when we send a new command, for instance if i do !tuturu, mem goes up but if i do it again, mem does not goes up

also if we use commands that do not use external website like access, who etc, memory does not goes up

Filename: /home/maxime-leroy/Documents/git/github/srcdslab/torchlight/src/torchlight/Commands.py

Line #    Mem usage    Increment  Occurrences   Line Contents
   345     55.2 MiB      0.6 MiB           3               resp = await asyncio.wait_for(
Rushaway commented 1 month ago

69 Fixed the majority of this issue. A small leak still present but it's nothing compared to previous leak.

image

maxime1907 commented 1 month ago

yeah i think its because yts is not working also, btw i have set a memory limit in pterodactyl so if it goes over the limit, the container will restart