0

I have running Nginx + Php-fpm. Php has limit of max_childs = 20. So, it is able to accept only 20 connections at single time. So, there are 2 questions:

  1. How to differentiate Nginx timeouts for waiting for "free" php child with time for waiting php child actually "working" time?

  2. Or how to make Php not to enqueue requests, which do not fit to max_children limit? And just quickly reject connection if there are no "free" child?

Because it causes some problem. If Nginx have fastcgi read timeout, for example 60s, and php script executes 20s.

So, if Nginx wait for "free" php child for more than 40s, there is no sense to begin php execution at all, because Nginx still can not wait for its answer due to timeout.

Molfar
  • 1,411
  • 3
  • 18
  • 49
  • I don't understand question #1. Are you asking two things there or one? As for #2... You want to prevent backlogging for sockfd? see: `listen.backlog `. Maybe try rephrasing things a bit. Not very clear what you are really trying to accomplish. – ficuscr Jul 05 '17 at 21:02
  • #1 how to make Nginx to wait for example 40 sec to phh process take it request into work, and additional 20 sec for waining while php working. – Molfar Jul 06 '17 at 04:58

0 Answers0