(70007)The timeout specified has expired

Keywords: WordPress Multisite - AWS - Technical issue - Other
bnsupport ID: 4bac1866-b1f9-a906-2f98-af1ef8008d98
Description:
Hello,

We’ve started to get the following errors within the apache error log:

‘[Wed Apr 07 16:21:41.489684 2021] [proxy_fcgi:error] [pid 23004:tid 140664163346176] (70007)The timeout specified has expired: [client IP::38696] AH01075: Error dispatching request to : (polli
ng), referer:’

We’ve changed from a T3a small to Medium & large to see if its a lack of memory related but does not resolve the issue.

There have been some updates to our httpd.conf but seems to be ok ?

<IfModule mpm_prefork_module>
  StartServers    5
  MinSpareServers 5
  MaxSpareServers 10
  MaxRequestWorkers       15
  MaxConnectionsPerChild  5000
  KeepAliveTimeout 2
</IfModule>

<IfModule mpm_event_module>
  ServerLimit               8
  StartServers              3
  MinSpareThreads         192
  MaxSpareThreads         384
  ThreadsPerChild          64
  MaxRequestWorkers       512
  MaxConnectionsPerChild 5000
</IfModule>

<IfModule mod_passenger.c>
  PassengerMinInstances       1
  # PassengerMaxInstancesPerApp 2
  PassengerMaxPoolSize        6
</IfModule>

and we’ve updated the timeout config as detailed in:
https://community.bitnami.com/t/70007-the-timeout-specified-has-expired-ah01075-error-dispatching-request-to-reading-input-brigade/69242/4

There aren’t that many active users on the site but it keeps falling over. We’ve migrated to the latest bitnami stack but the issue persists.

The only major change recently is we switched from a standalone memcache server to one hosted on the wordpress stack but there’s very little usage on DB/Page caching.

Any help is much appreciated!

We’ve also removed MySQL and use RDS instead so the server should be less resource intensive.

Hi @dev8,

In php-fpm logs I can see this:

[07-Apr-2021 16:11:23] WARNING: [pool www] server reached max_children setting (5), consider raising it

Yo can try to increase them in /opt/bitnami/php/etc/bitnami/common.conf.

I have also found this case in case it helps:
https://serverfault.com/questions/500467/apache2-proxy-timeout

Regards

Hello,

We’ve adjusted the php-fpm settings. Looks like they weren’t migrated from our previous image however the issue still persists. We’ve tried enabling & disable memcache but that doesnt appear to make much difference.

I’ve created a new support ticket with recent logs:
dd664dcd-474d-06f4-25ce-b5ad5c3c87bf

Thank you for helping :slight_smile:

The php-fpm config has been changed to 13 max children + upgraded from a T3a.small to T3a.medium (now 4GB ram)

Hi @dev8,

I can see they were increased. However, the error is still there (/opt/bitnami/php/var/log/php-fpm.log):

[09-Apr-2021 15:35:41] WARNING: [pool www] server reached pm.max_children setting (13), consider raising it

Could you check this blog post to calculate the maximum number of children for your server? http://myshell.co.uk/blog/2012/07/adjusting-child-processes-for-php-fpm-nginx

Also, if you suspect that those IPs are attacking your site, you can block them by following this guide

https://docs.bitnami.com/general/faq/configuration/block-suspicious-ip/

Regards