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 ответов

37 просмотров

Which programing language you are using and which library?

You must see your cpu usage and ram usage .

Колёсный-Селезень Автор вопроса
Тигровая Шелковица
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

Колёсный Селезень
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.

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

Обсуждают сегодня

Он в одиночку это дело запилил или была какая-то команда?
Фотографический Ёж
12
Вообще кстати бывают такие тулкиты чтобы вот разработал под ОС X, всё оттестировал работает А потом собрал под ОС Y - и там просто без вообще любых изменений заработало?
Пятнистый Ветер
14
всем привет, кто знает нормальный гайд как настроить отладчик в Intelij на Windows?
Ванильный Глухарь
6
А тут все сообщения из матрикс сервера видны будут?
Пятнистый Ветер
2
а телега разве проприетарная?
Пятнистый Ветер
2
А, вообще, знает кто-нить альтернативы D в области безопасных, читабельных ОО-языков?
Новое Лукошко
14
И его забанить админ если что сможет потом?
Пятнистый Ветер
1
А в чем прикол этого матрикса? @quantumde1
Пятнистый Ветер
1
моста? это теперь так гейт называют?
Дневная Трясогузка
1
Работа над эдишенами там какая-то ведется? Или пока что тишина?
Пятнистый Ветер
1
Карта сайта