Pritesh Jain
Pritesh Jain

Reputation: 9146

Passenger error when lots of concurrent calls

While doing a load test I found passenger throwing below error at first when lots of concurrent requests hit server. And, client side it gives 502 error code. However, after some requests say 1000- 2000 requests its works fine.

2013/07/23 11:22:46 [error] 14131#0: *50226 connect() to /tmp/passenger.1.0.14107/generation-
0/request failed (11: Resource temporarily unavailable) while connecting to upstream, client: 10.251.18.167, server: 10.*, request: "GET /home HTTP/1.0", upstream: "passenger:/tmp/passenger.1.0.14107/generation-0/request:", host: hostname

Server Details.

Passenger 4.0.10 ruby 1.9.3/2.0

Server Ec2 m1.xlarge 64-bit 4core 15gb

Ubuntu 12:24 LTS

Its a web server which servers dynamic webpages for rails framework

Can somebody suggest what the issue might be?

Upvotes: 2

Views: 643

Answers (1)

Hongli
Hongli

Reputation: 18924

A "temporarily unavailable" error in that context means the socket backlog is full. That can happen if your app cannot handle your requests fast enough. What happens is that the queue grows and grows, until it's full, and then you start getting those errors. In the mean time your users' response times grow and grow until they get an error. This is probably an application-level problem so it's best to try starting there. Try figuring out why your app is slow, at which request it is slow, and fix that. Or maybe you need to scale to more servers.

Upvotes: 1

Related Questions