Ah01075 error dispatching request to polling

Plesk "AH01075: Error dispatching request to" comes along with a “504 Gateway Time-out” or “503 Service Temporarily Unavailable” error on the website.

Plesk users may notice the error “AH01075: Error dispatching request to” in the domain’s error logs along with a “504 Gateway Time-out” or “503 Service Temporarily Unavailable” error on the website.

As part of our Server Management Services, we assist our customers with several Plesk queries.

Let us today discuss both of these cases differently.

Plesk “AH01075: Error dispatching request to”

Moving ahead, let us see how our Support Techs go about these errors.

503 Service Temporarily Unavailable on Plesk

Symptoms of this error include:

  • The /var/www/vhosts/example.com/logs/error_log file shows:
[proxy_fcgi:error] [pid 350:tid 139649016084224] (104)Connection reset by peer: [client 203.0.113.2:58642] AH01075: Error dispatching request to :, referer: http://example.com/wordpress/wp-admin/upload.php
  • `dmesg` command output shows:
[4289853.349670] php-cgi[49424]: segfault at 30 ip 00007fc662113088 sp 00007fc630ad3d10 error 4
[4289853.349672] in libMagickCore.so.5.0.0[7fc661f8e000+237000]

An ImageMagick library bug can cause this error.

In order to fix this, we disable the Imagick PHP module for PHP handler for the website:

  1. To do so, we log in to Plesk
  2. Browse to Tools & Settings > PHP Settings
  3. Then click on the PHP handler that is set for the domain, e.g. PHP 5.6:Plesk AH01075: Error dispatching request to
  4. To disable the extension, we Uncheck the Imagick checkbox:
    Plesk AH01075: Error dispatching request toLater, we ensure that no sites are using this module.

Make note that these settings are common to the 5.6.36 CGI applications5.6.36 FastCGI applications. The settings apply to all websites that use these handlers.

504 Gateway Time-out on website

Symptoms of this error include:

  • Website example.com is not accessible. We come across the below error in a browser:
504 Gateway Time-out
  • In the domain error log file, Domains > example.com > Logs, we see the error:
[proxy_fcgi:error] [pid 42290:tid 140458047010560] (70007)The timeout specified has expired: [client 203.0.113.2:54693] AH01075: Error dispatching request to :, referer: http://example.com/gallery
  • In the Plesk > Domains > example.com > PHP Settings it shows the website uses a “FastCGI application” (not an “FPM application”) PHP handler.

The cause of this error can be the execution PHP code of the website takes longer than the specified timeout.

To fix the issue, we increase the timeout. We can increase the FastCGI limits for an affected domain only or on a server-wide level.

Increase the FastCGI limits for a single domain:
  1. Log into Plesk
  2. Then, go to Domains > example.com > Apache & Nginx Settings.
  3. We add the following lines to the text boxes Additional directives for HTTP and Additional directives for HTTPS:
    FcgidIdleTimeout 1200
    FcgidProcessLifeTime 1200
    FcgidConnectTimeout 1200
    FcgidIOTimeout 1200
    Timeout 1200
    ProxyTimeout 1200

    However, if the website still shows “504 Gateway Timeout” we increase timeouts to higher values.

  4. Finally, we click OK to apply the changes.
Increase the FastCGI limits server-wide:
  1. We connect to the Plesk server via SSH as the root user.
  2. Then we open the FastCGI configuration file fcgid.conf in a text editor. The location of the file depends on the operating system:
    (a) for CentOS/RHEL/CloudLinux distributions:

    /etc/httpd/conf.d/fcgid.conf

    (b) for Debian/Ubuntu distributions:

    /etc/apache2/mods-enabled/fcgid.conf
  3. Eventually, we increase FastCGI timeout limits:
    FcgidIdleTimeout 1200
    FcgidProcessLifeTime 1200
    FcgidConnectTimeout 1200
    FcgidIOTimeout 1200
  4. If we use FPM PHP handler to create /etc/httpd/conf.modules.d/00-proxy_timeout.conf then we add the following lines into it:
    Timeout 1200
    ProxyTimeout 1200
  5. Then we test configuration with “apachectl configtest” command. The output will be similar to:
    # apachectl configtest
    Syntax OK
  6. Then we restart Apache:
    (a) for CentOS/RHEL-based operating systems:

    # service httpd restart

    (b) for Debian/Ubuntu-based operating systems:

    # service apache2 restart

[Need help with the fix? We’d be happy to assist]

Conclusion

In short, we saw how our Support Techs fix the Plesk error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

I was having the same problem, turns out Apache has module that handles timeouts called mod_reqtimeout

The default value (you won’t see it in the default http.conf) is:

RequestReadTimeout handshake=0 header=20-40,MinRate=500 body=20,MinRate=500

In my case I was uploading a file through a plain HTML form submission, so the file is technically part of the header and the default configuration says that the header will timeout at 20 to 40 seconds. The 20-40 thing is pretty cool because it will timeout at 20 seconds but if 500 bytes are sent in a second, it will add an additional second of wait time until it reaches 40 seconds and then timeout no matter what.

I upload larger files in my website so I added this line to my httpd.conf file:

RequestReadTimeout handshake=0 header=20-600,MinRate=500 body=20,MinRate=500

So as long as my user is sending data at a minimum of 500 bytes/s, the request will not time out until a max. of 600 seconds is reached (better read the documentation, don’t quote me on the throughput rate)

It’s actually a pretty cool Apache module but not super well known as people recommend to change other apache timeout settings in other similar «The timeout specified has expired:» problems related to PHP-FPM but this problem happens with any post that takes more than 40 seconds to be submitted by default in Apache.

James.Simpson


  • #1

Hi All,

I am trying everything I can think of to resolve these issues that i keep getting in the error_log

I see these all the time:

Code:

[Mon Jul 23 14:21:49.265694 2018] [proxy_fcgi:error] [pid 10118:tid 140174646310656] (70007)The timeout specified has expired: [client xxx.xxx.29.224:40002] AH01075: Error dispatching request to : (polling)
[Mon Jul 23 14:21:56.362524 2018] [proxy_fcgi:error] [pid 10202:tid 140174739064576] (70007)The timeout specified has expired: [client xxx.xxx.29.224:38942] AH01075: Error dispatching request to : (polling)
[Mon Jul 23 14:22:28.515437 2018] [proxy_fcgi:error] [pid 10118:tid 140174551901952] (70014)End of file found: [client xxx.xxx.29.224:56734] AH01075: Error dispatching request to : (reading input brigade)
[Mon Jul 23 14:22:39.519789 2018] [proxy_fcgi:error] [pid 10118:tid 140174509942528] (70014)End of file found: [client xxx.xxx.29.224:56758] AH01075: Error dispatching request to : (reading input brigade)
[Mon Jul 23 14:22:41.134359 2018] [proxy_fcgi:error] [pid 10174:tid 140174614841088] (70014)End of file found: [client xxx.xxx.29.224:56766] AH01075: Error dispatching request to : (reading input brigade)
[Mon Jul 23 14:22:43.621452 2018] [proxy_fcgi:error] [pid 10202:tid 140174728574720] (70014)End of file found: [client xxx.xxx.29.224:56772] AH01075: Error dispatching request to : (reading input brigade)
[Mon Jul 23 14:23:04.080491 2018] [proxy_fcgi:error] [pid 10263:tid 140174530922240] (70014)End of file found: [client xxx.xxx.29.224:56792] AH01075: Error dispatching request to : (reading input brigade)

I have had a look at all the timeouts and they are all the same (php timeout, apache timeout, all set to 300s)

I’m not sure where to start with this error.

cPanelMichael


  • #2

Hello James,

I recommend searching the PHP-FPM error logs (/opt/cpanel/ea-php$$/root/usr/var/log/php-fpm/error.log) for any domain name’s reaching the max_children limit. You’d replace ea-php$$ with each specific version of PHP (e.g. ea-php70) that PHP-FPM is utilized with on your system. The offending entries will look like this:

Code:

ERROR: unable to read what child say: Bad file descriptor (9)
NOTICE: [pool domain_tld] child 1234 exited with code 0 after 25.12345 seconds from start

If you find specific domain names are reaching the limit, you can increase the max_children value for them using the «Pool Options» feature in «WHM >> MultiPHP Manager».

Thank you.

James.Simpson


  • #3

Hi Michael,

I have checked in that file, and there are no errors being displayed at all, just the start up features.

I currently have:

PHP-FPM:
max-children: 100
Process Idle Timeout: 90
Max Requests: 1000

Apache:
Start Servers: 15
Min Spare: 20
Max Spare: 35
Server Limit: 300
Max Request Workers: 200
Keepalive: Off
Keepalive-timeout: 7
Max Keepalive requests: 150
Timeout: 300

Pre VirtualHost Include

Code:

<IfModule proxy_fcgi_module>

timeout 300
ProxyTimeout 300
</IfModule>

##Apache Event Default Settings (overrides main httpd.conf)
KeepAlive On
KeepAliveTimeout 2
MaxKeepAliveRequests 75

<IfModule event.c>
ThreadsPerChild 25
ServerLimit 16
MaxRequestWorkers 400
StartServers 6
MinSpareThreads 150
MaxSpareThreads 400
MaxRequestsPerChild 0
</IfModule>

<IfModule mod_fcgid.c>
FcgidMaxRequestsPerProcess 10000
FcgidMinProcessesPerClass 0
FcgidMaxProcessesPerClass 120
FcgidMaxProcesses 2000
FcgidProcessLifeTime 300
FcgidIOTimeout 300
FcgidIdleTimeout 60
FcgidIdleScanInterval 60
FcgidBusyTimeout 3600
FcgidConnectTimeout 10
FcgidBusyScanInterval 100
FcgidErrorScanInterval 3
FcgidZombieScanInterval 3
FcgidOutputBufferSize 0
FcgidZombieScanInterval 5
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 10000
FcgidMaxRequestLen 20468982
</IfModule>


It seems if processes seem to get stuck and just sits there loading until it times out.

  • #4

Please try changing the Apache httpd MPM from event to prefork. see if that helps

James.Simpson


  • #5

Apache is currently running on mod_mpm_worker

  • #6

Do you get error in worker as well?. If yes switch to prefork

cPanelMichael


  • #7

<IfModule proxy_fcgi_module>
timeout 300
ProxyTimeout 300
</IfModule>

Hello James,

You can try increasing both of these values from «300» to a higher number such as «500» to see if the issue continues. Ensure to monitor Apache’s performance after making the change as sometimes a timeout is a good thing since it can prevent Apache from overloading the server.

Thank you.

James.Simpson


  • #8

Hi Michael,

I’m not sure if that may be the issue or not — it seems like a sometimes a process may get stuck, as it will wait till 300+ seconds sometimes for a user when they are just trying to load a page, as if somehthing is hogging all the connections? Even though other users can fly through the website without any issues.

I’m struggling to find out what it is at all, as a script shouldnt be running for more than 300 seconds to view a single page?

cPanelMichael


  • #9

Hello James,

You can open a support ticket if you’d like us to take a closer look to rule out any issues with cPanel & WHM itself or it’s integration of PHP-FPM. You can post the ticket number here and we will link this forums thread to the ticket.

Thank you.

James.Simpson


  • #10

I think it may be server configuration somehwere to be fair.

So what looks like is happening, sometimes when clicking on a link, it will load instantly as it should, but then randomly every now and then, it will just load the page until maximum execution time is hit, and then finally load the page.

So for example just now, i’ve been browsing the website fine, and then i clicked on one link, and it took 290 seconds to load the page. Now after its loaded all the rest of the site is fine again. Not sure what can cause this so randomly — server load isnt massive, and I can see idle processes in apache waiting for a connection. Mysql isnt processing anything either….

cPanelMichael


  • #11

So for example just now, i’ve been browsing the website fine, and then i clicked on one link, and it took 290 seconds to load the page. Now after its loaded all the rest of the site is fine again. Not sure what can cause this so randomly — server load isnt massive, and I can see idle processes in apache waiting for a connection. Mysql isnt processing anything either….

Hello James,

We’d need access to the affected system to reproduce this behavior and determine if there are any obvious reasons for the increased page load time. Are you able to open a support ticket so we can take a closer look?

Thank you.

my web server reaches the state of being unreachable every 1-2 days until I completely restart the server.

The server is Debian Bullseye with the newest Apache + PHP 7.4. I’m using FPM, because I want to have HTTP2. 16 GB RAM vServer.

/var/log/apache2/error.log:

[Sat May 07 18:01:57.970776 2022] [proxy_fcgi:error] [pid 139033:tid 139719866291968] (70007)The timeout specified has expired: [client xxxIPxxx:47330] AH01075: Error dispatching request to : (polling)
[Sat May 07 18:02:42.854791 2022] [proxy_fcgi:error] [pid 269312:tid 139720560633600] (70007)The timeout specified has expired: [client xxxIPxxx:32702] AH01075: Error dispatching request to : (polling)

Of course, I found different posts / solutions about this issue and I already increased the timeouts for PHP and FPM, but this bug is still there.

/var/log/php7.4-fpm.log:

[07-May-2022 07:05:01] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it                                                                                                                                                                                    
[07-May-2022 07:46:42] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it                                                                                                                                                                                    
[07-May-2022 09:14:09] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it                                                                                                                                                                                    
[07-May-2022 09:27:13] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it                                                                                                                                                                                    
[07-May-2022 12:27:16] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it                                                                                                                                                                                    
[07-May-2022 15:05:19] NOTICE: [pool www] child 265395 exited with code 0 after 13010.271694 seconds from start                                                                                                                                                                               
[07-May-2022 15:05:19] NOTICE: [pool www] child 267508 started                                                                                                                                                                                                                                
[07-May-2022 15:13:40] NOTICE: [pool www] child 265396 exited with code 0 after 13510.447458 seconds from start                                                                                                                                                                               
[07-May-2022 15:13:40] NOTICE: [pool www] child 267637 started                                                                                                                                                                                                                                
[07-May-2022 16:13:26] NOTICE: [pool www] child 265945 exited with code 0 after 13622.463297 seconds from start                                                                                                                                                                               
[07-May-2022 16:13:26] NOTICE: [pool www] child 268279 started                                                                                                                                                                                                                                
[07-May-2022 17:42:16] NOTICE: [pool www] child 267508 exited with code 0 after 9417.705135 seconds from start                                                                                                                                                                                
[07-May-2022 17:42:16] NOTICE: [pool www] child 269286 started                                                                                                                                                                                                                                
[07-May-2022 17:45:07] NOTICE: [pool www] child 267637 exited with code 0 after 9087.193478 seconds from start                                                                                                                                                                                
[07-May-2022 17:45:07] NOTICE: [pool www] child 269309 started                                                                                                                                                                                                                                
[07-May-2022 19:20:39] NOTICE: Terminating ...                                                                                                                                                                                                                                                
[07-May-2022 19:20:39] NOTICE: exiting, bye-bye!                                                                                                                                                                                                                                              
[07-May-2022 19:20:55] NOTICE: fpm is running, pid 694                                                                                                                                                                                                                                        
[07-May-2022 19:20:56] NOTICE: ready to handle connections                                                                                                                                                                                                                                    
[07-May-2022 19:20:56] NOTICE: systemd monitor interval set to 10000ms 

How can I solve this problem?

Thank you very much.

Здесь VPS на BrainyCP за 2$ в месяц, а здесь 50GB шаред-хостинг на BrainyCP за 1.9$ в месяц

koystrubvs

Сообщения: 35
Зарегистрирован: Вс мар 10, 2019 5:53 pm

Ошибки WP 503/504

Сервер работает шустро. Но, установил WP, установил Elementor и через время заходя на страницу плагины — идет долгая загрузка и через раз ошибка 504.
При первой загрузке сайта — некоторые элементы не показывается из-за 503 ошибки. При повторной загрузке норм.
Подскажите. Nginx Apache удалял и ставил заново — нифига. 2 ядра и 4 гб Памяти выделил.

Пример на одном из сайтов
[Sun Mar 17 12:41:11.917661 2019] [proxy_fcgi:error] [pid 67321:tid 140542318991104] [client 35.175.205.111:58106] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined function get_header() in /wp-content/themes/twentyfifteen/index.php:17nStack trace:n#0 {main}n thrown in /wp-content/themes/twentyfifteen/index.php on line 17’, referer: http://sucuri.net
[Sun Mar 17 12:41:11.977281 2019] [autoindex:error] [pid 67323:tid 140541983381248] [client 35.175.205.111:58108] AH01276: Cannot serve directory /wp-includes/css/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
[Sun Mar 17 18:27:42.980657 2019] [proxy_fcgi:error] [pid 48821:tid 140318326322944] [client 37.131.193.16:55374] AH01067: Failed to read FastCGI header, referer:/wp-admin/post.php?post=65&action=elementor
[Sun Mar 17 18:27:42.987577 2019] [proxy_fcgi:error] [pid 48821:tid 140318326322944] (104)Connection reset by peer: [client 37.131.193.16:55374] AH01075: Error dispatching request to : , referer: /wp-admin/post.php?post=65&action=elementor
[Sun Mar 17 18:27:46.533523 2019] [proxy_fcgi:error] [pid 49307:tid 140318376679168] [client 37.131.193.16:55378] AH01067: Failed to read FastCGI header, referer: /wp-admin/post.php?post=65&action=elementor
[Sun Mar 17 18:27:46.533568 2019] [proxy_fcgi:error] [pid 49307:tid 140318376679168] (104)Connection reset by peer: [client 37.131.193.16:55378] AH01075: Error dispatching request to : , referer: /wp-admin/post.php?post=65&action=elementor
[Sun Mar 17 18:27:57.117609 2019] [proxy_fcgi:error] [pid 50221:tid 140318739322624] [client 37.131.193.16:55418] AH01067: Failed to read FastCGI header, referer: /wp-admin/
[Sun Mar 17 18:27:57.117655 2019] [proxy_fcgi:error] [pid 50221:tid 140318739322624] (104)Connection reset by peer: [client 37.131.193.16:55418] AH01075: Error dispatching request to : , referer: /wp-admin/
[Mon Mar 18 11:31:43.441907 2019] [proxy_fcgi:error] [pid 4466:tid 140348860856064] (70007)The timeout specified has expired: [client 37.131.193.167:33244] AH01075: Error dispatching request to : (polling), referer: /wp-admin/update.php?action=upload-plugin


Аватара пользователя

sbury

Сообщения: 1083
Зарегистрирован: Вт фев 06, 2018 7:51 am

Re: Ошибки WP 503/504

Сообщение

sbury » Ср мар 20, 2019 7:00 am

так он же вам пишет
PHP Fatal error: Uncaught Error: Call to undefined function get_header() in /wp-content/themes/twentyfifteen/index.php:17


koystrubvs

Сообщения: 35
Зарегистрирован: Вс мар 10, 2019 5:53 pm

Re: Ошибки WP 503/504

Сообщение

koystrubvs » Ср мар 20, 2019 11:47 am

Это просто одна из ошибок, которая не относится к серверу. Другие посмотрите пожалуйста.


koystrubvs

Сообщения: 35
Зарегистрирован: Вс мар 10, 2019 5:53 pm

Re: Ошибки WP 503/504

Сообщение

koystrubvs » Ср мар 20, 2019 11:55 am

[Mon Mar 18 11:31:43.441907 2019] [proxy_fcgi:error] [pid 4466:tid 140348860856064] (70007)The timeout specified has expired: [client 37.131.193.167:33244] AH01075: Error dispatching request to : (polling), referer: /wp-admin/update.php?action=upload-plugin

Вот например. Перехожу на страницу обновления плагинов. И долго грузит, минуту, и может в 504 выкинуть.


koystrubvs

Сообщения: 35
Зарегистрирован: Вс мар 10, 2019 5:53 pm

Re: Ошибки WP 503/504

Сообщение

koystrubvs » Чт мар 28, 2019 11:00 am

Если буде возможность как нибудь гляньте пожалуйста)


Аватара пользователя

sbury

Сообщения: 1083
Зарегистрирован: Вт фев 06, 2018 7:51 am

Re: Ошибки WP 503/504

Сообщение

sbury » Пт мар 29, 2019 10:20 am

в конфиге сайта посмотрите значение
conn_limit
попробуйте увеличить его в два раза, потом
systemctl restart nginx


koystrubvs

Сообщения: 35
Зарегистрирован: Вс мар 10, 2019 5:53 pm

Re: Ошибки WP 503/504

Сообщение

koystrubvs » Пт мар 29, 2019 3:49 pm

Буду благодарен если подскажете где найти этот conn_limit :(


koystrubvs

Сообщения: 35
Зарегистрирован: Вс мар 10, 2019 5:53 pm

Re: Ошибки WP 503/504

Сообщение

koystrubvs » Пт мар 29, 2019 3:57 pm

На всех WP сайтах, вот такая фигня:

[Tue Mar 26 23:55:19.396014 2019] [proxy_fcgi:error] [pid 3696] (70007)The timeout specified has expired: [client 178.213.202.156:44300] AH01075: Error dispatching request to : (polling)
[Tue Mar 26 23:55:23.534746 2019] [proxy_fcgi:error] [pid 125333] (70007)The timeout specified has expired: [client 178.213.202.156:44306] AH01075: Error dispatching request to : (polling)
[Tue Mar 26 23:57:05.975632 2019] [proxy_fcgi:error] [pid 8293] (70007)The timeout specified has expired: [client 178.213.202.156:44474] AH01075: Error dispatching request to : (polling), referer: /wp-admin/plugin-install.php
[Tue Mar 26 23:58:49.762779 2019] [proxy_fcgi:error] [pid 7407] (70007)The timeout specified has expired: [client 178.213.202.156:44596] AH01075: Error dispatching request to : (polling), referer: /wp-admin/plugin-install.php
[Wed Mar 27 00:00:04.447853 2019] [proxy_fcgi:error] [pid 7407] (70007)The timeout specified has expired: [client 178.213.202.156:44696] AH01075: Error dispatching request to : (polling), referer: /wp-admin/update.php?action=upload-plugin
[Wed Mar 27 00:38:08.611463 2019] [proxy_fcgi:error] [pid 8293] [client 178.213.202.156:48300] AH01071: Got error ‘PHP message: PHP Warning: Invalid argument supplied for foreach() in /wp-includes/class-wp-list-util.php on line 150n’, referer:/wp-admin/post.php?post=94&action=elementor
[Fri Mar 29 13:48:30.789355 2019] [proxy_fcgi:error] [pid 4448:tid 139683468076800] (70007)The timeout specified has expired: [client 37.120.129.106:34716] AH01075: Error dispatching request to : (polling), referer:/wp-admin/
[Fri Mar 29 13:50:28.821058 2019] [proxy_fcgi:error] [pid 4451:tid 139683401033472] (70007)The timeout specified has expired: [client 37.120.129.106:34878] AH01075: Error dispatching request to : (polling), referer:/wp-admin/plugin-install.php
[Fri Mar 29 13:51:59.889915 2019] [proxy_fcgi:error] [pid 4451:tid 139683493254912] (70007)The timeout specified has expired: [client 37.120.129.106:34990] AH01075: Error dispatching request to : (polling), referer:/wp-admin/plugin-install.php
[Fri Mar 29 13:53:39.517729 2019] [proxy_fcgi:error] [pid 4451:tid 139683325499136] (70007)The timeout specified has expired: [client 193.176.87.122:35098] AH01075: Error dispatching request to : (polling), referer:/wp-admin/plugin-install.php
[Fri Mar 29 13:55:19.696442 2019] [proxy_fcgi:error] [pid 4450:tid 139683735959296] (70007)The timeout specified has expired: [client 193.176.87.122:35242] AH01075: Error dispatching request to : (polling), referer: /wp-admin/plugin-install.php
[Fri Mar 29 13:56:28.690275 2019] [proxy_fcgi:error] [pid 4450:tid 139683744352000] (70007)The timeout specified has expired: [client 193.176.87.122:35400] AH01075: Error dispatching request to : (polling), referer: /wp-admin/plugin-install.php


koystrubvs

Сообщения: 35
Зарегистрирован: Вс мар 10, 2019 5:53 pm

Re: Ошибки WP 503/504

Сообщение

koystrubvs » Пн апр 01, 2019 5:39 am

Вообщем такая хрнеь только после установки плагина Elementor.
Но это важный плагин, на нем все сайты делаю.
До этого было 2 хостера разных. Такой проблемы не было. Куда можно копать?



У меня есть облачный хостинг в Google, это отстойно, если честно, но я пытаюсь это сделать, я установил стек LAMP на виртуальную машину и поместил свой сайт в htdocs. Когда я пытаюсь получить доступ к моему сайту, он дает мне request timeout, но иногда он работает 5 минут или около того.

Когда я вижу журналы ошибок apache, это дает мне этот

075: Error dispatching request to : (polling)
[Tue Oct 27 18:12:55.185819 2015] [proxy_fcgi:error] [pid 4995:tid 140183521683200] (70007)The timeout specified has expired: [client 162.158.255.169:34198] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:12:55.487458 2015] [core:notice] [pid 2953:tid 140183785137920] AH00052: child pid 4995 exit signal Segmentation fault (11)
[Tue Oct 27 18:12:55.787973 2015] [proxy_fcgi:error] [pid 5063:tid 140183530075904] (70007)The timeout specified has expired: [client 199.27.133.137:13151] AH01075: Error dispatching request to : (polling), referer: http://whichtube.com/watch/g9-4dCeFQng/allama-nasir-abbas-jawab-ali-as-nae-talwar-kayou-na-uthai.html
[Tue Oct 27 18:12:57.542883 2015] [proxy_fcgi:error] [pid 5329:tid 140183521683200] (70007)The timeout specified has expired: [client 173.245.56.198:51348] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:12:57.976752 2015] [proxy_fcgi:error] [pid 5063:tid 140183479719680] (70007)The timeout specified has expired: [client 173.245.56.198:63779] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:12:58.993666 2015] [proxy_fcgi:error] [pid 5194:tid 140183496505088] (70007)The timeout specified has expired: [client 162.158.255.141:16226] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:12:59.196701 2015] [proxy_fcgi:error] [pid 5329:tid 140183513290496] (70007)The timeout specified has expired: [client 173.245.56.198:32819] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:13:01.462039 2015] [proxy_fcgi:error] [pid 5329:tid 140183504897792] (70007)The timeout specified has expired: [client 199.27.128.166:48057] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:13:07.518999 2015] [proxy_fcgi:error] [pid 5063:tid 140183471326976] (70007)The timeout specified has expired: [client 173.245.56.198:13694] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:13:16.804990 2015] [proxy_fcgi:error] [pid 5261:tid 140183513290496] (70007)The timeout specified has expired: [client 199.27.128.134:28694] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:13:33.055860 2015] [proxy_fcgi:error] [pid 5328:tid 140183236331264] (70007)The timeout specified has expired: [client 39.41.139.220:52154] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:13:57.391361 2015] [proxy_fcgi:error] [pid 5063:tid 140183521683200] (70007)The timeout specified has expired: [client 39.41.139.220:52029] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:13:57.552542 2015] [core:notice] [pid 2953:tid 140183785137920] AH00052: child pid 5063 exit signal Segmentation fault (11)

Мой сайт находится в PHP, я не изменил ничего другого, кроме разрешения на директорию. Есть ли что-то, что мне не хватает?

27 окт. 2015, в 20:25

Поделиться

Источник

3 ответа

Для меня перезапуск php-fpm сделал свою работу. Посмотрев в логе, как советовал @varlogtim. Журнал показал, что за последние 12 часов не было активности…

David
03 янв. 2019, в 17:13

Поделиться

У меня тоже была эта проблема. Возможно, вам захочется найти часть жесткого кода и соединение с другим недоступным сервером в вашем коде. (например, локальный IP-адрес, недоступный в Интернете).

Для моего, я проверил php-fpm.log на моем сервере, и я обнаружил, что мое приложение пытается подключиться к старому серверу (неправильный IP), и он сталкивается с тайм-аутом.

Saeed Sepehr
08 янв. 2018, в 17:09

Поделиться

Похоже, что ваш PHP-код занимает больше времени, чем установленный тайм-аут. Когда apache загружает страницу PHP с помощью fcgi, он отправляет запрос службы PHP-FPM для обработки. Если PHP-FPM требует ответа, то вы увидите этот тип тайм-аута. Возможные причины: ваш PHP-код может застревать в цикле или ждать ответа от базы данных, которая занимает особенно много времени.

Чтобы устранить неполадки, я использовал бы версию CLI для PHP, чтобы узнать, завершается ли script в разумные сроки ($ time php/path/to/file.php). В журнале PHP-FPM может быть дополнительная информация (по умолчанию:/var/log/php-fpm.log).

varlogtim
11 нояб. 2016, в 11:30

Поделиться

Ещё вопросы

  • 0Лайтбокс, отображающий окно перезагрузки при загрузке страницы
  • 0Nebulous C ++ Ошибка компиляции
  • 1Как изменить ссылку на JSON, который копируется в другой объект [duplicate]
  • 1CA Rally — Как получить детали дочернего объекта, например, из ProjectPermission получить детали проекта
  • 1Как получить положение элементов в галерее, когда пользователь прокручивает его?
  • 1Получение отзывов об ошибках в Android
  • 1Извлечение твитов определенного хэштега с помощью twitter4j
  • 0Как AngularJS способен различать эти два свойства?
  • 0curl_file_create из файлового ресурса, используя mongo gridfs
  • 0XML и PHP — Удалить запись с формой — Неустранимая ошибка
  • 1Доступ к групповым индексам панд по второму индексу
  • 0это в AngularJS
  • 1Установить ХПК на Android-сервере Bluetooth
  • 0Функция стиля нг и встроенный вместе
  • 0Ошибка sql syntanx Я хочу сравнить две таблицы данных в одном запросе
  • 1Обновить AppWidget из программы?
  • 0Метод jquery .submit () не восстанавливает страницу
  • 1перемещение индекса в другое место двоичного файла
  • 0foreignKey или inverseForeignKey для таблицы «многие ко многим»
  • 0Добавьте другую функцию jQuery к каждой кнопке в том же классе
  • 0Как применить темы к HTML внутри метода append ()
  • 0Заставить браузер открывать новые окна в стиле SW_HIDE?
  • 1Как исправить это исключение java.lang.String не может быть приведен к пользовательскому типу
  • 1Android: получение пользовательской трансляции при нажатии кнопки в виджете
  • 0Проблема в сборке выпуска Visual Studio 2012
  • 0Allegro al_load_ttf_font не может найти файл
  • 0Chrome favicon.ico GET запрос
  • 1Базовый класс из Windows Service
  • 0Как вызвать ссылку (тег) двойным щелчком вместо одного клика? [Дубликат]
  • 0Функция как для строк в стиле C, так и для c ++ std :: string
  • 1Сокращение времени расчета и требований к большой ковариационной матрице
  • 0оператор создания объекта без использования оператора new в c ++ трактуется как оператор объявления переменной или оператор вызова функции?
  • 1Написание объектов из потока в Android
  • 1Как использовать OrderBy в linq для DataTable в asp.net
  • 0Трудность получения коллекции моделей Require.js
  • 0Помехи при индексации таблиц при вставке в несколько таблиц
  • 0Это возможно с регулярными выражениями в Dreamweaver?
  • 0C ++ Как работает повышение духа паразитами
  • 1Подписка на шаблон Meteor JS: невозможно запросить данные с помощью find () даже после Template.instance (). SubscriptionReady ()
  • 0Использование указателей и массивов для решения линейной системы
  • 1массив размером 2 — если один из элементов пуст, установите его равным другому
  • 0Как перезагрузить применение директивы при изменении структуры div ng-repeat?
  • 0удалить элементы в многомерном массиве на основе двух значений
  • 0разбиение строки на разные массивы
  • 1Проблема внешней подписи PDF с сертификатом встраивания
  • 0JavaScript, если () не работает
  • 0Php как отправить на страницу с похожим словом
  • 0Доступ к данным объекта / членам метода с помощью шаблонов
  • 0Каков наилучший способ компилировать JavaScript-подобные структуры в статический, быстрый C ++?
  • 1Сохраните напечатанный результат в кадре данных в Python

Сообщество Overcoder

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account


Closed

isantolin opened this issue

Jun 17, 2020

· 20 comments

Labels

bug

Verified issues on the current code behavior or pull requests that will fix them

Comments

@isantolin

Describe the bug
The basic Codeigniter 4 without any configuration and a Server with default configuration (That works with Codeigniter 3) Cant load and shows 503 error

CodeIgniter 4 version
v4.0.3

Affected module(s)
Codeigniter

Expected behavior, and steps to reproduce if appropriate

  • Put Basic Codeigniter on /Apache directory
  • point DocumentRoot to /Apache/public
  • Point the browser to: http://localhost (Delays more than 10 seconds to load) and…
  • The following error will appear
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
[Tue Jun 16 21:51:05.886556 2020] [proxy_fcgi:error] [pid 937802:tid 140579791218432] [client ::1:34246] AH01067: Failed to read FastCGI header
[Tue Jun 16 21:51:05.886598 2020] [proxy_fcgi:error] [pid 937802:tid 140579791218432] (104)Connection reset by peer: [client ::1:34246] AH01075: Error dispatching request to :
[Tue Jun 16 21:53:09.284478 2020] [proxy_fcgi:error] [pid 937802:tid 140579681842944] [client ::1:34798] AH01067: Failed to read FastCGI header
[Tue Jun 16 21:53:09.284563 2020] [proxy_fcgi:error] [pid 937802:tid 140579681842944] (104)Connection reset by peer: [client ::1:34798] AH01075: Error dispatching request to : 

Context

  • OS: Fedora 32
  • Web server: Apache 2.4.43
  • PHP-FPM: 7.4.7

@isantolin
isantolin

added
the

bug

Verified issues on the current code behavior or pull requests that will fix them

label

Jun 17, 2020

@paulbalandan

Is this still an issue?

If yes, have you tried giving permissions to php to write in the writable folder?

@isantolin

@paulbalandan Now showing :

( ! ) Fatal error: Uncaught Error: Maximum function nesting level of ‘256’ reached, aborting! in /var/www/html/project-root/vendor/codeigniter4/framework/system/Config/BaseService.php on line 195

(Same configuration)

@paulbalandan

Have you tried upgrading to the latest version?

@isantolin

Have you tried upgrading to the latest version?

yes, i am using the last version

@paulbalandan

@paulbalandan Now showing :

( ! ) Fatal error: Uncaught Error: Maximum function nesting level of ‘256’ reached, aborting! in /var/www/html/project-root/vendor/codeigniter4/framework/system/Config/BaseService.php on line 195

(Same configuration)

This is a problem with the xdebug extension. It seems BaseService has entered infinite recursion. Can you post a screenshot of the error page?

@isantolin

@michalsn

Please, edit your php.ini file and increase value for xdebug.max_nesting_level

@isantolin

@michalsn Xdebug not installed

(base) [root@airwave7 php.d]# php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
imagick
intl
json
libxml
mbstring
mcrypt
memcache
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
uopz
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

@paulbalandan

How is that possible? That error page is produced by xdebug

@paulbalandan

@isantolin can you try changing BaseService on lines 191 to 201 and changing to the following. See diff:

        public static function __callStatic(string $name, array $arguments)
	{
		$name = strtolower($name);

-		if (method_exists(Services::class, $name))
+		if (method_exists(static::class, $name))
		{
-			return Services::$name(...$arguments);
+			return static::$name(...$arguments);
		}

		return static::discoverServices($name, $arguments);
	}

Please see if that solves your issue?

@isantolin

@isantolin

image

@paulbalandan

@paulbalandan Not yet

image

At least that solves the function nesting issue. Can you try using the latest develop branch? Line 139 on system/bootstrap.php on mine is a whitespace only.

@isantolin

@paulbalandan I tryied with the development version. Old error returns

image

@paulbalandan

Yes that is expected because it will overwrite your changes. Trying changing it again to use static.

@isantolin

@paulbalandan

@isantolin i’m sorry i think this is a bug in PHP already. __callStatic should only be called when the static method is not present in a class. In your case, however, __callStatic is ALWAYS called even though the static method is existing in the class. autoloader and discoverServices are, as you can see, defined static methods, so calling those should invoke them directly, not going through __callStatic. This causes the infinite recursion error you are facing.

Have you tried in php other than php-fpm?

@isantolin

@paulbalandan no, because all my server infraestructure is based in php-fpm and CI4 needs to be compatible.
Exists any workaround to deal with this bug?

@paulbalandan

I’m sorry I’m not well versed with php-fpm. Can you try opening a bug report to the PHP core?

@paulbalandan

Since this is not a framework issue, I’m closing this.

Labels

bug

Verified issues on the current code behavior or pull requests that will fix them

Like this post? Please share to your friends:
  • Ah01071 got error access to the script
  • Ah00558 apache2 ошибка
  • Ah00534 httpd configuration error no mpm loaded
  • Ah00534 apache2 configuration error more than one mpm loaded
  • Ah00526 syntax error on line 27 of etc httpd bx conf default conf