# Nginx Can't handeled More Perl CGI concurrent Request

**URL:** <https://www.ruby-forum.com/t/nginx-cant-handeled-more-perl-cgi-concurrent-request/244855>\
**Category:** NGINX\
**Created:** [June 27, 2016, 7:37am UTC](https://www.ruby-forum.com/t/nginx-cant-handeled-more-perl-cgi-concurrent-request/244855 "2016-06-27T07:37:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [June 27, 2016, 7:37am UTC](https://www.ruby-forum.com/t/nginx-cant-handeled-more-perl-cgi-concurrent-request/244855/1 "2016-06-27T07:37:38Z")

</div>

Hello

We are using Fastcgi module in nginx with perl.

We are trying to send 200 concurrent perl cgi request, but after  
increase  
the 250 concurrent request to specific script, We are getting below  
error in  
nginx log file.

[error] 23526#0: \*3291 connect() to unix:/var/run/fcgiwrap.socket failed  
(11: Resource temporarily unavailable) while connecting to upstream,  
client:  
::1, server: \_, request: “POST /cgi-bin/example/example-xml.cgi  
HTTP/1.1”,  
upstream: “fastcgi://unix:/var/run/fcgiwrap.socket:”, host: “localhost”

In my nginx file content following configuration.

location /cgi-bin/ {

```
gzip off;
# Set the root to /usr/lib (inside this location this means that we 

```

are  
# giving access to the files under /usr/lib/cgi-bin)  
root /usr/lib/;  
# Fastcgi socket  
fastcgi\_pass unix:/var/run/fcgiwrap.socket;  
# fastcgi\_pass 127.0.0.1:8999;  
# Fastcgi parameters, include the standard ones  
include /etc/nginx/fastcgi\_params;  
# Adjust non standard parameters (SCRIPT\_FILENAME)  
fastcgi\_param SCRIPT\_FILENAME $document\_root$fastcgi\_script\_name;  
}

The Same things Apache can handle 500+ concurrent request without any  
extra  
configuration.

Can any one suggest me how to achieve this OR Is there any mistake in my  
configuration to make it working with more concurrent request ?

If you require more log feel free to ask.

Posted at Nginx Forum:

> **[Nginx Can't handeled More Perl CGI concurrent Request](https://forum.nginx.org/read.php?2,267885,267885#msg-267885)**
>
> Hello We are using Fastcgi module in nginx with perl. We are trying to send 200 concurrent perl cgi request, but after increase the 250 concurrent request to specific script, We are getting below error in nginx log file. \[error\] 23526#0: \*3291...

---

<div class="post-metadata">

**Author:** ![bhavik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecc23a/32.png) [@bhavik](https://www.ruby-forum.com/u/bhavik)\
**Post date:** [June 27, 2016, 2:45pm UTC](https://www.ruby-forum.com/t/nginx-cant-handeled-more-perl-cgi-concurrent-request/244855/2 "2016-06-27T14:45:49Z")

</div>

Hello!

On Mon, Jun 27, 2016 at 01:36:50AM -0400, bhavik wrote:

> We are using Fastcgi module in nginx with perl.
> 
> We are trying to send 200 concurrent perl cgi request, but after increase  
> the 250 concurrent request to specific script, We are getting below error in  
> nginx log file.
> 
> [error] 23526#0: \*3291 connect() to unix:/var/run/fcgiwrap.socket failed  
> (11: Resource temporarily unavailable) while connecting to upstream, client:  
> ::1, server: \_, request: “POST /cgi-bin/example/example-xml.cgi HTTP/1.1”,  
> upstream: “fastcgi://unix:/var/run/fcgiwrap.socket:”, host: “localhost”

The message indicate that listen queue of the backend socket is  
overflowed, your backend can’t cope with load. Make sure to tune  
your backend properly - number of processes and socket liste queue  
are most important things to consider.

Note well that if you are in fact using fcgiwrap as the socket  
name suggests, it’s a wrong approach for a loaded server.  
Consider converting your scripts to use FastCGI directly instead.

[…]

–  
Maxim D.

> **[nginx](http://nginx.org/)**
