my site keeps going down on my shared hosting account and this is what my host said:

It appears that the IP address of your site is being blocked on the firewall due to your site causing excessive connections to itself.

"101 connections to self"

Anyone know what this means, i've never heard of a 101 error before. My site is built on PHP / MySQL.

Accepted Answer

Since you mention PHP, maybe you're requiring or including files through http requests instead of from the local disk?

Something like the following would cause PHP to include the file, but get it via a http request, which gets served by your webserver. Essentially a 'connection to self'.

include 'http://www.example.com/file.php?foo=1&bar=2';

Or maybe you're defined a Constant PATH somewhere, expecting to do:

require _PATH_ . "/file.php";

As long as PATH is actually a path, it'll be fine, but if you accidentally set it to be a url, you'll cause the require to go through the webserver again. Not very efficient.

Check your code or logs for connections like that.

Written by Martijn Heemels
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki