# Nginx won't send FIN ACK to PHP-FPM

**URL:** <https://www.ruby-forum.com/t/nginx-wont-send-fin-ack-to-php-fpm/222408>\
**Category:** NGINX\
**Created:** [August 27, 2012, 3:04pm UTC](https://www.ruby-forum.com/t/nginx-wont-send-fin-ack-to-php-fpm/222408 "2012-08-27T15:04:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [August 27, 2012, 3:04pm UTC](https://www.ruby-forum.com/t/nginx-wont-send-fin-ack-to-php-fpm/222408/1 "2012-08-27T15:04:09Z")

</div>

Hey,

I have Rest API server powered by Nginx and PHP-FPM. Each API call  
produces  
several CURL requests.

The script that executes the API calls, also utilizes CURL. I use curl  
multi  
exec, with 1,000 threads. All the setup creates a little bit less than  
10K  
sockets.

Anyway, here is the problem…

The script that executes the API calls, let’s say 3,000 on 1K threads.  
It  
takes around 170 secs to finish processing all those API calls. However,  
when the main script tries to return a response to the browser and  
initiate  
a FIN\_WAIT it takes 8 minutes until everything is returned to the  
browser.

Here is how it looks:  
[http://d.pr/i/1WkI](http://d.pr/i/1WkI)

My theory is that it happens because Nginx puts the worker somehow on  
hold  
or something like that. This was the first worker in the chain of  
workers.  
There is no data being transferred since the worker initiated the  
request to  
PHP-FPM.

Any ideas what should I do?

Thanks.

Posted at Nginx Forum:

> **[Nginx won't send FIN ACK to PHP-FPM](https://forum.nginx.org/read.php?2,230145,230145#msg-230145)**
>
> Hey, I have Rest API server powered by Nginx and PHP-FPM. Each API call produces several CURL requests. The script that executes the API calls, also utilizes CURL. I use curl multi exec, with 1,000 threads. All the setup creates a little bit less...

---

<div class="post-metadata">

**Author:** ![dantes](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b487fb/32.png) [@dantes](https://www.ruby-forum.com/u/dantes)\
**Post date:** [September 1, 2012, 12:27pm UTC](https://www.ruby-forum.com/t/nginx-wont-send-fin-ack-to-php-fpm/222408/2 "2012-09-01T12:27:03Z")

</div>

Hello!

On Mon, Aug 27, 2012 at 08:46:43AM -0400, dantes wrote:

> There is no data being transferred since the worker initiated the request to  
> PHP-FPM.
> 
> Any ideas what should I do?

I would recommend to obtain debug log and show us nginx -V, full  
config and debug log, much like [GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub](http://wiki.nginx.org/Debugging)  
suggests.

Maxim D.
