Question about high memory usage?
AYMENJD opened this issue · 8 comments
Hello, i run tdlight-bot-api on my 16gb ram Ubuntu 16 server .
I have a load on my bot and the tdlight-bot-api takes for my bot 5gb of ram .
In my case i use api.telegram.org
for sending messages etc, and tdlight-bot-api server for getParticipants
and getChat
, UserMode ;
can u add a command line option that run the td engine just for calling methods not for storing,sending updates or cache something like file_ids or users data?
Hi, can you please attach logs, graphs or something?
Cc: @cavallium
Hello, set a webhook to an empty location to allow the update queue to empty, this way you'll save some memory, if you can't set a webhook use getUpdates with offset set to -1 (you'll have to set a cron or do it every request or so depending on the structure of your bot)
Hello, set a webhook to an empty location to allow the update queue to empty, this way you'll save some memory, if you can't set a webhook use getUpdates with offset set to -1 (you'll have to set a cron or do it every request or so depending on the structure of your bot)
What about My suggestion?
Also when calling optimizeMemory
after some minutes my tdlight-bot-api server will be down
I call optimizeMemory
just now and he stops the tdlight-bot-api server check the uptime here https://broadcast.aym9n.xyz/memstats.php
That's bad. We should do something about it
@MarcoBuster Yes , I think my suggestion is good or ?
Leave it here, no problem
OptimizeMemory will be removed with the next update, please restart the api when you want to free the memory.
Sorry but it's unfortunately how bot api works 🤷♂️