Reputation: 480
I have been banging my head since yesterday on this problem If you could help, I will be very thankful.
Setup:
Our website is configured to run on the IP 22.33.44.54 (say). The server has a secondary IP assigned to it as 22.33.44.55.
Problem:
Yesterday our server got overloaded. It was hitting MaxClients very frequently (normally we have around 85-90 connections on the server at a time). This usually did not happen so we started investigating and found that around 45-50% connections on Port80 were coming back from our own IP on which the website was running. The server support said that the problem is with the PHP Application and it is connecting back to the server on Port80.
From Apache access_log:
22.33.44.55 - - [21/Oct/2013:19:14:39 +0100] 200 /home/xxxxx/public_html/index.php 303396 www.example.com "-" "-"
22.33.44.54 - - [21/Oct/2013:19:14:40 +0100] 302 /home/xxxxx/public_html/8973.jpg 317 example.com "-" "-"
22.33.44.55 - - [21/Oct/2013:19:14:30 +0100] 200 /home/xxxxx/public_html/index.php 303396 www.example.com "-" "-"
22.33.44.54 - - [21/Oct/2013:19:14:42 +0100] 302 /home/xxxxx/public_html/8973.jpg 317 example.com "-" "-"
Upvotes: 1
Views: 49
Reputation: 26264
Do a grep of your code and search for 127.0.0.1, your IP 22.33.44.55, and localhost.
find . -name \*.php | xargs grep 127.0.0.1
find . -name \*.php | xargs grep localhost
You might have include ("http://localhost/mylibrary.php");
somewhere in there, from either a greedy search & replace or intern.
Upvotes: 1