开发者

Apache+Passenger - Apache running; but not responding to requests

开发者 https://www.devze.com 2023-01-06 13:54 出处:网络
Background I\'m running a Ruby on Rails application that has to serve a lot of static files as well. My setup currently is:

Background

I'm running a Ruby on Rails application that has to serve a lot of static files as well.

My setup currently is:

Debian Linux Lenny 5.0 Apache 2.2.9 Passenger 2.2.10

The problem

Everything runs fine. I see apache process spinning up, passenger instances get created and everything works fast and snappy.

Then, after some time Apache does not respond to requests any more. Clients do get a connection and are "waiting for a response", but none comes.

I cannot manually reproduce this problem. Sometimes it occurs a few hours after a restart, other times it takes a f开发者_JAVA百科ew days to happen. Here's what I found:

Apache process are up; Passenger is there, but it does not have any instances spun up (probably because instances die after a period of inactivity)

No error messages or problems in /var/log/syslog, /var/log/messages, not in apache's access and errors logs, not in my Rails production log. Nothing.

When I stop and start apache everything is back to normal.

Does any one have any clues what's happening here? And how it can be resolved?


Due to an enormous load on static files we decided to host static files on separate server (later Amazon S3+CloudFront) for performance reasons.

My current guess is that Apache couldn't cope with the large number of requests on static files and also doing Passenger. The current setup is Nginx+Unicorn for the Rails application and S3+CloudFront for static files.

0

精彩评论

暂无评论...
验证码 换一张
取 消