I went to some problems, i have a bot with

3000 groups, the bot start to not responding , pending updates is 60000 thousand, is there a way to fix the issue , what I did wrong ?

5 ответов

11 просмотров

Which programing language you are using and which library?

You must see your cpu usage and ram usage .

A- Автор вопроса
✨✨Hamid✨✨
You must see your cpu usage and ram usage .

i use php, php-fpm enabled, cpu usage goes 100% when i use fast_cgi_request. is there a way to put limits like 25 fast cgi request finish. Because now when i open it the cpu goes 100% directly my ram is 64GB and used 15GB

A
i use php, php-fpm enabled, cpu usage goes 100% wh...

You should not limit the number of requests sent to the bot because these requests accumulated and cause the bot to stop working. You either need to have a more powerful CPU or examine your code to see where you haven't used appropriate algorithms and identify areas where, for example, your database code is weak and problematic. Look at which queries were not designed well. See which fields in your table need indexing to speed up your queries. Identify which parts of your code are performing intensive calculations and, if possible, use more suitable algorithms. Of course, keep in mind that it depends on your application; you may need to avoid processing certain requests based on certain criteria. For example, you may consider some requests from certain users as spam and delete them at the outset to avoid processing them. Many things can be done; it depends on your program.

Похожие вопросы

Карта сайта