Score:0

Handling simultaneous requests in Apache 2 and php-fpm

vn flag

We have a Debian 10 server with Apache2 and PHP-FPM installed.

The problem is that when I try to process multiple requests simultaneously from one client, server doesn't handle it correctly.

For example, I send a request from clientA that may take 60 seconds to proceed, now I send 10 other requests from the same client which are easy to process and would response in less than 1 sec in a normal situation, but they wait until the first request (60sec one) completes and only then they start being processed and giving response. Sometimes, easy requests have been returning error code 504 Timeout because of the heavy process.

Note that while a heavy process from cliantA is being processed, other clients still can send requests, so it's a problem only with the client who is sending the heavy request.

I almost tried nothing because I didn't know what to search and the results I had, just wasn't correct for my problem.

For any other information or configurations you think I need to share, please comment below.

All your help is appreciated.

Mahyar Khanbabai avatar
vn flag
I Know this question may be a little confusing, but I appreciate anything that makes me a few steps closer to the answer! If you need more detailed info about this problem, just send a comment. Thanks.
Michael Hampton avatar
cz flag
Check the php-fpm slow log.
Mahyar Khanbabai avatar
vn flag
@MichaelHampton Thanks for your contribution, I know which process is running slowly and I can't change it as it is already in it's best performance that is currently possible. I just want the server to process other small requests as well even while a large process from the same client is being processed.
Michael Hampton avatar
cz flag
We cannot really help if you do not share any relevant information!
Mahyar Khanbabai avatar
vn flag
@MichaelHampton What information do you mean? What should I share? I just asked above that if anything is needed, tell me to update the question. Thanks
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.