Answer the question
In order to leave comments, you need to log in
How long will it take to process a request?
Hello. I want to know this moment: there is a script on the server, let it be script.php, every minute it is called by cron and the command is executed for 10-15 seconds. Also, this script processes other requests (for example, it receives data from a website form and adds it to the database). And now such a question, CRON started (the script runs for 10 seconds) and at that moment a request was received to add data to the database to the same script, how long will the addition to the database take?
1) right away
2) after cron finishes
??
I guess option 2, but what do you say?
Answer the question
In order to leave comments, you need to log in
If you don't take any special action - all* requests are processed in parallel ( * actually not all, but by the number of web server workers - but for simplicity it's easier to consider that all).
I will say more - if your script is running for example 2 minutes - then every minute one more thread will still be launched.
In general, this is a question that can be easily verified experimentally :-)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question