# Multiple connections to a fastcgi server

**URL:** <https://www.ruby-forum.com/t/multiple-connections-to-a-fastcgi-server/206506>\
**Category:** NGINX\
**Created:** [May 3, 2011, 1:02pm UTC](https://www.ruby-forum.com/t/multiple-connections-to-a-fastcgi-server/206506 "2011-05-03T13:02:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [May 3, 2011, 1:02pm UTC](https://www.ruby-forum.com/t/multiple-connections-to-a-fastcgi-server/206506/1 "2011-05-03T13:02:19Z")

</div>

Hello,

I want to build a fast cgi server application which can handle  
multiple simoultanous calls. I found the threaded.c (or threaded.pl)  
example in the fast cgi sdk.  
([http://www.fastcgi.com/devkit/examples/threaded.c](http://www.fastcgi.com/devkit/examples/threaded.c))

But when running with my current configuration, the webserver only  
opens one connection at time and the second requests is waiting until  
the first one is finished. I don’t want to use multiplexing. It could  
be done through multiple connections.

default:

server {  
…  
location ~ .c$ {  
include /etc/nginx/fastcgi\_params; #or whatever you named it  
# fastcgi\_pass unix:/tmp/c.socket;  
fastcgi\_pass 127.0.0.1:9000;  
}  
}

Is it possible to change this behaviour?

Thanks  
Marc

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 3, 2011, 2:16pm UTC](https://www.ruby-forum.com/t/multiple-connections-to-a-fastcgi-server/206506/2 "2011-05-03T14:16:55Z")

</div>

Hello!

On Tue, May 03, 2011 at 01:01:53PM +0200, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I want to build a fast cgi server application which can handle  
> multiple simoultanous calls. I found the threaded.c (or threaded.pl)  
> example in the fast cgi sdk.  
> ([http://www.fastcgi.com/devkit/examples/threaded.c](http://www.fastcgi.com/devkit/examples/threaded.c))
> 
> But when running with my current configuration, the webserver only  
> opens one connection at time and the second requests is waiting until  
> the first one is finished. I don’t want to use multiplexing. It could  
> be done through multiple connections.

nginx will open as many connections to fastcgi backend as it has  
concurrent requests.

If you see only one connection at a time - you may want to check  
fastcgi app and testing tools you are using, probably  
serialization of requests happens there.

Maxim D.
