Answer the question
In order to leave comments, you need to log in
How to increase the performance of php on the server?
There is a php file request handler from the Telegram BOT API.
With multiple requests to the bot, the php handler stops processing any requests.
I solved the problem like this, for each request I open a background process
exec('bash -c "exec nohup setsid php ./script.php > /dev/null 2>&1 &"');
Answer the question
In order to leave comments, you need to log in
try writing in C++ to compile and call it script.cgi and not load the server with unnecessary processes.
let the finished program work and not your script code
Since you are doing tasks in the background, it makes sense to do it idiomatically.
For PHP via Gearman: gearman.org
PS:
PHP provides a huge field for its optimization on an epic scale. Therefore, I will not try to describe even just the directions in this field.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question