Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

Is it possible you're opening several connections to MySQL without closing them? Perhaps using persistent connections for some reason?

Could it be One Hundred and One connections to yourself, not an error code?

If not, what software are you running other than PHP?

Very hard to tell what is really going on without knowing which framework/CMS you are using, but I would suggest you search your code for any usage of include/fopen/curl/file_get_content. Could you provide us with more information?

There is no 101 error. This is basically saying that they logged 101 calls from your site to resources on your site, which is really strange and they were right to block because such things can become the basis of an attack. Your page might have gotten hacked or you might just have a broken recursion somewhere. Can we see the code? Also, your shared server probably has logs...look through for references to your account's path and see if it is calling a specific resource over and over.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top