eBot-CSGO icon indicating copy to clipboard operation
eBot-CSGO copied to clipboard

Slow work with a large number of current matches

Open csplkiller opened this issue 8 years ago • 5 comments

Slow work with a large number of current matches EBot works slowly when I have more than 16 matches at a time. Responds to the start command from 30 to 60 seconds! Counts the score of matches with a delay. When changing sides, players need to wait until he takes into account the played rounds. There is a waiting for the completion of the half, when half is finished, and players are waiting for the script to count the matches ....

What can be corrected, that he could control for example 50 simultaneous matches or more?

I changed the value of usleep (500); In Application.php set the value to 50 milliseconds, it did not help. This is the only time I have discovered. I ask help from knowledgeable people.

--------------------------- на русском языке -----------------------------

eBot работает медленно, когда у меня идет более 16 матчей одновременно. Отвечает на команду запуска от 30 до 60 секунд! Учитывает счет матчей с задержкой. При смене сторон, игрокам надо ждать пока он учтет сыгранные раунды. Идет ожидание завершения половины, когда половина уже закончена, и игроки ждут, пока скрипт сосчитает матчи....

Что можно исправить, что бы он мог контролировать к примеру 50 одновременных матчей или более ?

Я изменил значение usleep(500); в Aplication.php поставил значение 50 миллисекунд, это не помогло. Это единственная задержка которую я обнаружил. Прошу помощи от знающих людей.

csplkiller avatar Jul 17 '17 13:07 csplkiller

Specs of the server?

Do you have any logs that you can share?

Is the same server hosting eBot, eBot-Web, the MySQL DB and the 16 matches?

I don't understand this russian(?) text.

heew avatar Aug 22 '17 07:08 heew

Russian text is equal English.

Pilik avatar Aug 22 '17 08:08 Pilik

Composer (version 1.5.1) successfully installed to: /home/ebot/ebot-csgo/composer.phar Use it: php composer.phar

Some settings on your machine may cause stability issues with Composer. If you encounter issues, try to change the following:

The zlib extension is not loaded, this can slow down Composer a lot. If possible, install it or recompile php with --with-zlib

Pilik avatar Aug 22 '17 17:08 Pilik

It seems like your server is too weak for eBot, you should upgrade it. If you want reduce load, you should increase usleep() argument value. And try to reduce ping between eBot and your game servers.

------------------------------ In Russian ------------------------------

Походу, у тебя слишком слабый сервер и не справляется с нагрузкой, создаваемой ботом. Если ты хочешь ее минимизировать, то надо увеличить значение аргумента usleep(). Еще попробуй минимизировать пинг между ботом и игровыми серверами.

PolarWooolf avatar Aug 22 '17 18:08 PolarWooolf

The performance problem that you see might be related to the new Application (4 years old) if you are using the new bootstrap (4 years old). In order to fix this issue you have to edit the following file

src/eBot/Application/Application.php

lines 288 to 291

        if ($nbMessage < 100) {
            \eBot\Manager\MatchManager::getInstance()->sendPub();
            \eTools\Task\TaskManager::getInstance()->runTask();
        }

you have to either change the constant 100 to 10000 or something large or remove the if clause at all. This should fix the performance issues.

xaxo05 avatar Jan 27 '18 12:01 xaxo05