Forum: Rails deployment Apache 2.2.4 + Mongrel 1.0.1, Random Hanging

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dylan M. (Guest)
on 2007-03-01 22:21
(Received via mailing list)
I have an apache 2.2.4 server proxying requests to 5 backend mongrels,
8001-8005. (It's an ubuntu 6.10 server). Some of the users are having
sporadic problems with the site simply not responding, and eventually
timing out. There is nothing in the error logs to help me figure out
why this might be happening. If the users then access the mongrel
directly on one of the backend ports, everything works perfectly.

I've been pulling my hair out trying to figure this one out
(especially since it's usually my boss's computer that decides to stop
responding, right after he punched in 20 minutes worth of a telephone
call into a Project Setup form). I want to say it's an Apache problem
since the mongrels respond just fine, but I'm not sure. I've tried
completely reinstalling my apache/mongrel stack with the latest
versions, etc., but it still happens.

When I ran our site on Lighttpd+fcgi, I never had these problems. I
also haven't come across the problem in Safari yet, but I'm the only
mac user here. The problem does appear in Firefox and Internet
Explorer, though.

Can anyone help a [very] frustrated person?
Spencer Miles (Guest)
on 2007-03-03 00:48
(Received via mailing list)
I'm having the same problem.  Just switched from Lighttpd/fastcgi to
Apache2.2.3/mongrel yesterday.

One very strange thing i'm noticing is that Apache keeps making
"internal dummy connections" to mongrel.  If i look at the access log,

$ tail -f access_log  | grep "Apache"
::1 - - [02/Mar/2007:16:42:34 -0600] "GET / HTTP/1.0" 200 15556 "-"
"Apache/2.2.3 (Unix) (internal dummy connection)"
"083a8eb9b3d6c4cc0f1dbf03b71a3b4a" "-"
::1 - - [02/Mar/2007:16:42:35 -0600] "GET / HTTP/1.0" 200 15556 "-"
"Apache/2.2.3 (Unix) (internal dummy connection)"
"1a452223f77526cff8ebd3ddb1ca1899" "-"
::1 - - [02/Mar/2007:16:42:36 -0600] "GET / HTTP/1.0" 200 15556 "-"
"Apache/2.2.3 (Unix) (internal dummy connection)"
"651fbf7f8fc5e871c67674b98cc4f5f9" "-"
::1 - - [02/Mar/2007:16:42:37 -0600] "GET / HTTP/1.0" 200 15556 "-"
"Apache/2.2.3 (Unix) (internal dummy connection)"
"893fe0173de1d40ee2f30cac61aa6944" "-"
::1 - - [02/Mar/2007:16:42:38 -0600] "GET / HTTP/1.0" 200 15556 "-"
"Apache/2.2.3 (Unix) (internal dummy connection)"
"1c792514dba4d45956c6e44da520ae60" "-"

As you can see, this is happening almost once every second.  The Rails
app is then processing these requests:

$ tail -f production.log | grep index
Processing SiteController#index (for ::1 at 2007-03-02 16:43:45) [GET]
PID: 28053
  Parameters: {"action"=>"index", "controller"=>"site"}
Rendering site/index
Processing SiteController#index (for ::1 at 2007-03-02 16:43:46) [GET]
PID: 28050
  Parameters: {"action"=>"index", "controller"=>"site"}
Rendering site/index
Processing SiteController#index (for ::1 at 2007-03-02 16:43:47) [GET]
PID: 28047
  Parameters: {"action"=>"index", "controller"=>"site"}
Rendering site/index
Processing SiteController#index (for ::1 at 2007-03-02 16:43:48) [GET]
PID: 28047
  Parameters: {"action"=>"index", "controller"=>"site"}
Rendering site/index
Processing SiteController#index (for ::1 at 2007-03-02 16:43:49) [GET]
PID: 28047
  Parameters: {"action"=>"index", "controller"=>"site"}
Rendering site/index
Processing SiteController#index (for ::1 at 2007-03-02 16:43:50) [GET]
PID: 28059
  Parameters: {"action"=>"index", "controller"=>"site"}
Rendering site/index


I'm not sure if these problems are related, but it seems VERY strange
for apache to keep connecting to mongrel, and I really don't like the
fact that it's putting unnecessary pressure on rails to serve up these
requests (site/index is a dynamic page).

-Spencer
This topic is locked and can not be replied to.