5

We are having problems with our containers in our ECS service. The purpose of this service is to receive data and save it to s3. Service is running fine until it is being used in production and healtcheck start failing.

For our healthcheck we use this line to determine php-fpm state: cgi-fcgi -bind -connect localhost:9001

From tailing php fpm log in /var/log I can see this line over and over again:

[pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers)

Now I found many articles explaining how to set php fpm settings for my application, primarily this one: https://thisinterestsme.com/php-fpm-settings/

Based on the article I can see that we have 2 cores and each php-fpm process averages 40MB. Our total RAM is around 16GB. Based on these settings I can calculate php-fpm server values:

pm.max_children = 16GB / 40MB = 400
pm.start_servers = 2 cores x 4 = 8
pm.max_spare_servers = 2 cores x 4 = 8
pm.min_spare_servers = 2 cores x 2 = 4

I tried way bigger settings as well like start_servers = 32, but I am still receiving same warnings, which makes me think something is not configured properly.

kaktusas2598
  • 641
  • 1
  • 7
  • 28

0 Answers0