# Request for 127.0.0.1 on remote servers (is it caching?)

**URL:** <https://www.ruby-forum.com/t/request-for-127-0-0-1-on-remote-servers-is-it-caching/104974>\
**Category:** Rails\
**Created:** [May 24, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/request-for-127-0-0-1-on-remote-servers-is-it-caching/104974 "2007-05-24T14:20:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehudros](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3ec8ea/32.png) [@ehudros](https://www.ruby-forum.com/u/ehudros)\
**Post date:** [May 24, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/request-for-127-0-0-1-on-remote-servers-is-it-caching/104974/1 "2007-05-24T14:20:16Z")

</div>

Hi everyone,  
I’m having some trouble understanding what’s going on with my  
production server.  
When a page is accessed, sometimes after the page is already displayed  
(in the log I get a 200 OK message for the entire page), I see tons of  
requests for 127.0.0.1, and I just can’t understand where they’re  
coming from.  
I read a bit about caching and mongrel and I’m starting to think it  
might have something to do with caching (although I have not specified  
caching for any of my controllers, in the production.rb it is set to  
true).

The real problem is I have a routing redirect for every request that  
does not start with www (e.g: [user.mysite.com](http://user.mysite.com)) to be direct to the  
user/index action. so what happens with those unknown requests is that  
they too are redirected which is causing heavy load for the webserver  
for no reason.

I can of course work around the issue of the redirection somehow, but  
i’m more in interested in why it happens.

Thanks!  
Ehud

---

<div class="post-metadata">

**Author:** ![ehudros](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3ec8ea/32.png) [@ehudros](https://www.ruby-forum.com/u/ehudros)\
**Post date:** [May 24, 2007, 2:36pm UTC](https://www.ruby-forum.com/t/request-for-127-0-0-1-on-remote-servers-is-it-caching/104974/2 "2007-05-24T14:36:35Z")

</div>

On 24 May 2007, at 14:19, Ehud wrote:

> The real problem is I have a routing redirect for every request that  
> does not start with www (e.g: [user.mysite.com](http://user.mysite.com)) to be direct to the  
> user/index action. so what happens with those unknown requests is that  
> they too are redirected which is causing heavy load for the webserver  
> for no reason.
> 
> I can of course work around the issue of the redirection somehow, but  
> i’m more in interested in why it happens.

Are you using Pound for the load balancing by any chance?

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![ehudros](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3ec8ea/32.png) [@ehudros](https://www.ruby-forum.com/u/ehudros)\
**Post date:** [May 24, 2007, 8:46pm UTC](https://www.ruby-forum.com/t/request-for-127-0-0-1-on-remote-servers-is-it-caching/104974/3 "2007-05-24T20:46:58Z")

</div>

Nope, I’m running mongrel cluster with apache 2.0…  
It seems that whenever I try to access a page, after it is generated  
and sent a lot of other calls are also  
logged to [http://127.0.0.1/](http://127.0.0.1/) by an unknown source… 🙂  
also strange is that the session id of these calls is not the same as  
the session id of my own user, meaning it is indeed not requests made  
by me.  
Any thoughts?

---

<div class="post-metadata">

**Author:** ![ehudros](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3ec8ea/32.png) [@ehudros](https://www.ruby-forum.com/u/ehudros)\
**Post date:** [May 24, 2007, 9:12pm UTC](https://www.ruby-forum.com/t/request-for-127-0-0-1-on-remote-servers-is-it-caching/104974/4 "2007-05-24T21:12:09Z")

</div>

Are they requests for images, css and javscript files?

Have you looked in the Apache log to correlate the requests?

---

<div class="post-metadata">

**Author:** ![ehudros](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3ec8ea/32.png) [@ehudros](https://www.ruby-forum.com/u/ehudros)\
**Post date:** [May 25, 2007, 12:06am UTC](https://www.ruby-forum.com/t/request-for-127-0-0-1-on-remote-servers-is-it-caching/104974/5 "2007-05-25T00:06:31Z")

</div>

good idea, thanks for the advice.  
there are in fact entries in the access log like this:  
127.0.0.1 - - [24/May/2007:22:01:38 +0000] “GET / HTTP/1.0” 302 89 “-”  
“Apache/2.2.4 (Unix) mod\_ssl/2.2.4 OpenSSL/0.9.8b PHP/5.2.1 (internal  
dummy connection)”

for each of the requests I get in my production.log.

there are also lots of entries for stylesheets, js and images, but the  
one I’ve pasted is trying to access “/”, which then gets redirected to  
rails and logged in my rails log file. I wonder what’s causing those  
hits?

thanks for the help guys 🙂
