5 months ago
From time to time my telegram bot deployed on railways is bery slow. Right now it sloow too. My users are suffering. I am on pro plan. I have two exactly same bots deployed on railway. One has few users, the second has more. The second one with higher user count is freezing. What can I do?
0 Replies
5 months ago
theres really not much we can do for you here at the platform level, your code is suffering from increased load
I understand. Yesterday, I had the same amount of load. but today it is freezing.
5 months ago
guess you have a little bit more load today
5 months ago
are you using webhooks? as long as you are, maybe you could add replicas?
There could be many causes to that. For example, the application itself could be doing a lot of slow operations, like making external requests sequentially, not using batching etc.
5 months ago
also, for future reference, friendly reminder - <#727685388893945877> #5
Also, if it uses polling with a timeout instead of webhooks, well, that will have a delay equal to the polling interval
Does it use any significant amount of resources? If not, there's a huge chance that it's either not using webhooks or doesn't use parallel requests
You should be able to use the WebhookInfo
method, described in the Telegram Bot API, to get current webhook status