• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved The timeout specified has expired: AH01075: Error dispatching request to : - without URL in my logs - Error 502 - since php 8.2.13 - randomly

phildolyon

New Pleskian
Server operating system version
CentOS Linux 7.9.2009
Plesk version and microupdate number
Plesk Obsidian Version 18.0.56 Update #4, last updated on Nov 8, 2023 03:43 AM
I upgrade my PHP to 8.2.13 and I have an issue since couple of days on one of my website ( i have 5 web sites on my plesk )
Before updating php, my website was never down for 4 years

Sometimes (randomly, 2 or 3 times per week ) , my web site is down with error 502.

on my logs there are 2 types of error :
Apache Error : (70007)The timeout specified has expired: AH01075: Error dispatching request to : [ Without any url ]
nginx Error : 23113#0: *1718489 upstream timed out (110: Connection timed out) while reading response header from upstream

I try to restart my PHP-FPM and nothing happens , my web site is still down
I try to restart my Apache server and my web site is up
But 1 or 2 days later, my web site is down again

I think that the Nginx error is caused by my apache server.
But I don't understand why my Apache server is down ? ( only on one site, the others work well )
I have not any big script that can stop my apache server, and i don't need to change the timeout.
I try to downgrade my PHP to 7.4.33 but the issue is still there.
I have a cron every hour , with a little script that use an get_file_content , Is it possible that this is what blocks the php? ( i know there are so many strange issues with get_file_contents )

Please help me
 
Maybe the number of "max_children" in PHP FPM settings (on the PHP configuration page of the domain) is too low?
 
it's 5, I don't get a lot of traffic on this website. I don't think that is the problem but i try ! i take all idea :)
 
It could be an infinite rewrite loop that causes more and more instances to spawn. In that case more and more capacity is used to process PHP scripts. Nested "includes" maybe?
 
In addition to Peters reply, have you tried?

Code:
# journalctl -xe

and

# journalctl -u httpd.service

might help to find out the reason for Apache stopped.
 
7 days without issue.
I use Nginx instead Apache and i hope it's the solution ! ( it's not really a solution but it's work )
I don't think it was an error in my code, because there would be the same problem with nginx or Apache, no ?

I will use #journalctl to try to find out the reason for Apache Stopped. Thank's
 
Glad to hear that! ) Yes, I think #journalctl will help. I had a similar issue recently caused by Actomic Mod_Security. The Apache stopped working when the AUM updating the ruleset but your issue might be totally different.
 
One month without issue , but bad news, last week my server crashed twice with nginx.
I try a new config for my PHP FPM, i change the pm.max_requests, before unlimited, now at 100
to be continued
 
max_requests can be high, but should not be unlimited. The value ensures that memory leaks (or other issues) cannot grow big enough to crash the service. So maybe a value of 10000 could be good choice.
 
YEEESSSSS i found the solution !
Since PHP 8 i have an issue with File_get_contents() , Curl or fopen() . When i use an absolute URL with my own web site ( file_get_contents('https://www.mywebsite.xxx/xxx.txt') FPM doesn't close connection. If 10 child processes be created at the same time my FPM explode and all my website is down. ( no problem with 8 or 9 but 10 BOOM )
If i use an absolute URL with another website, there is no problem, and if i use an relative URL with my own website, there is no problem too.
I used "Hey" a load testing software ( GitHub - rakyll/hey: HTTP load generator, ApacheBench (ab) replacement ) to help me to find the solution.

I don't know if the problem come from PHP 8.0 or my Plesk optimisation but it's very strange !
 
Back
Top