Closed agolaszewski closed 3 years ago
Hi! This is issue from core lib: madelineProto. Its running in backround threads even after unset of its instance. This causes memory leaks, and prevents garbage collector to clean memory. The only way i know to clean memory: stop container. I restart mine every 12 hours. If you want to remove session: logout, stop container, remove session files manually.
And i do not recomend to run multiple sessions in one container. Better override ENTRYPOINT and add more containers in docker-compose.yml. Run run one session per container. Because if one session breaks down badly it will affect whole script and other sessions will stop respond until reboot or even remove of broken session.
Healthcheck script can detect hangups and restart container (in case telegram servers went down, for example), but if one session gets permanent ban, or got corrupted reboot wont fix anything.
Hey, thanks for advices. Yes I have noticed that sometimes when one session becomes corrupted the whole container is stopped and there is no other way then remove image and its volume to make it works again
Hello, I have a problem with session removal. When I remove session from the system by successfully calling :
http://127.0.0.1:9503/system/removeSession?session=users/958f770f-8f01-40a0-827b-6730a8b77197
and thenhttp://127.0.0.1:9503/system/unlinkSessionFile?session=users/958f770f-8f01-40a0-827b-6730a8b77197
After that I callhttp://127.0.0.1:9503/system/getSessionList
I see no sessions, but the amount of allocated memory doesn't decreasewhat is odd, that after calling
unlinkSessionFile
the amount actually increase. Also I see that entries in db aren't deleted. In the logs I can spot thisExecuting over and over again, around every minute.
Here is a screen from![image](https://user-images.githubusercontent.com/13737492/124784623-64fdee00-df46-11eb-9d1c-480abbbe6605.png)
sessions/users
directoryMy docker compose:
and my env settings (I removed appId and secret just for public) https://gist.github.com/agolaszewski/cf3a1fdee78131e3ece2d10f2edeff29 Docker image version : https://hub.docker.com/layers/xtrime/telegram-api-server/latest/images/sha256-eb5400b87bbcd0bfc3348585795501c19a8ec84cb7ac0775e16e50ac98739676?context=explore
Any ideas what is wrong?