Parallel requests problem

I have a small script:
<?php
sleep(5);
echo time();
?>
when I send two request at same time from two tabs, the output of 2 tabs should be equal, but they’re not! the difference is 5. because it doesn’t process second request until the first one finishes.
I’m using nginx as webserver. how can I solve that? thank you.

Hey yaqoubi,

I doubt this is a hestia issue. I accidentally crashed my server a couple months ago because I ran too many parallel requests at a time. So it’s definitely possible and I didn’t do anything special to make this happen. lol

It’s pretty difficult to help with such little information though. Could you start by letting us know some more information about your setup? Eg: OS, OS Version, Hestia Version.

How are you ensuring these processes are initiated at the exact same time?

Have you done any custom modifications to your system before or after installing Hestia?

1 Like

No, It’s not a hestica issue.
I didn’t customize system. I tried apache, nginx and now I’m using hestica to modify my VPS, and this problem happened every time.
you can see in these animation, one of them can process multiple request (I used exec function to process the requests in background) but other one can’t.

but here I used exec function to process requests in background. and it can process multiple request at same time.


now I’m using ubuntu 18

We try to handle hestia only issues here in the forum. As far as I understand, you have the issue aswell on apache2/nginx (-only) systems. In that case it isnt related to hestia itself, more a issue with the used bot software. So probaly a support case for the forum you got the bot from?

It’s because of the webserver, I don’t know why can’t it process parallel requests

You should do these tests from the cli with curl not with the web browser as it is installing session cookies which would prevent concurrency (unless you allready configured a different session driver that is able to handle multiple requests for the same session)

It’s alright when I use Curl, how can I configure a different session driver that is able to handle multiple requests for the same session?