# Fastcgi msg\_id always 1?

**URL:** <https://www.ruby-forum.com/t/fastcgi-msg-id-always-1/212311>\
**Category:** NGINX\
**Created:** [September 29, 2011, 9:16am UTC](https://www.ruby-forum.com/t/fastcgi-msg-id-always-1/212311 "2011-09-29T09:16:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [September 29, 2011, 9:16am UTC](https://www.ruby-forum.com/t/fastcgi-msg-id-always-1/212311/1 "2011-09-29T09:16:43Z")

</div>

I was looking at the fastcgi, I found out that all fcgi request have a  
msg\_id of 1?

What happens when more than 1 fcgi requests comes in and first one is  
still being handled. how does the fcgi server know the the difference  
in requests? Usually each request has it own connection, but if  
keepalive is on the then many request can come in on the same  
connection.

I am use “ab” to test the nginx+ fastcgi server response time.

---

<div class="post-metadata">

**Author:** ![Shaun\_savage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9a140/32.png) [@Shaun\_savage](https://www.ruby-forum.com/u/Shaun_savage)\
**Post date:** [September 29, 2011, 9:36am UTC](https://www.ruby-forum.com/t/fastcgi-msg-id-always-1/212311/2 "2011-09-29T09:36:27Z")

</div>

Hello!

On Thu, Sep 29, 2011 at 03:15:55PM +0800, Shaun savage wrote:

> I was looking at the fastcgi, I found out that all fcgi request have a  
> msg\_id of 1?

Yes.

> What happens when more than 1 fcgi requests comes in and first one is  
> still being handled. how does the fcgi server know the the difference  
> in requests? Usually each request has it own connection, but if  
> keepalive is on the then many request can come in on the same connection.

The id is only need to be unique when multiple request exists in  
parallel within a single connection. This is not the case even  
with keepalive used.

Maxim D.

---

<div class="post-metadata">

**Author:** ![Shaun\_savage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9a140/32.png) [@Shaun\_savage](https://www.ruby-forum.com/u/Shaun_savage)\
**Post date:** [September 29, 2011, 9:58am UTC](https://www.ruby-forum.com/t/fastcgi-msg-id-always-1/212311/3 "2011-09-29T09:58:43Z")

</div>

On Thu, Sep 29, 2011 at 3:35 PM, Maxim D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > still being handled. how does the fcgi server know the the difference  
> > in requests? Usually each request has it own connection, but if  
> > keepalive is on the then many request can come in on the same connection.
> 
> The id is only need to be unique when multiple request exists in  
> parallel within a single connection. This is not the case even  
> with keepalive used.

E.g multiplexing not supported.
