Dynamic PHP Script File problem

Started by welshdog, May 13, 2014, 11:00:52 PM

Previous topic - Next topic

welshdog

Site: Australian Opinion
SMF: version 2.0.7
Theme: SMF-Default
Mods: assorted - mostly security/spam filtering

Issue: Site stopped functioning yesterday when browser returned "Resources Exceeded". To release the site I added both bandwidth and disk space to its quota and it told me I had exceeded the entire amount available on my reseller account!! I wrote to the hosts immediately who fixed it for me but then told me the problem was caused by phpscripts and sent me a screenshot (attached).

Their advice was to block the country most of the problem was caused by, i.e. China, but I'm wondering what a "Dynamic PHP Script File" is, is it part of SMF, can it be updated to stop this happening again and if so... how. The support site suggested I modify the .htaccess file to block China but that seems a bit savage and wondered if there was an alternate remedy or is this the best approach?

As far as I understand htaccess files all I need do is add...

     order deny,allow
     deny from .cn

... and that will block China entirely... yes... but is it wise? :)

Thanks in advance.

Arantor

Dynamic PHP script file... every request to SMF is a call to a dynamic PHP script file. Every page load to the forum is one of those. Since that's kind of the point: dynamic scripts are ones that don't have exactly the same content every time, they get it from a database or similar. That's kind of how SMF works. To remove that would mean to remove the ability of users to post content on a regular basis.

Blocking China will help if 1) you don't have users from China and 2) they're the ones consuming a lot of resources.
Holder of controversial views, all of which my own.


welshdog

Quote from: Arantor on May 13, 2014, 11:04:33 PM
Dynamic PHP script file... every request to SMF is a call to a dynamic PHP script file. Every page load to the forum is one of those. Since that's kind of the point: dynamic scripts are ones that don't have exactly the same content every time, they get it from a database or similar. That's kind of how SMF works. To remove that would mean to remove the ability of users to post content on a regular basis.

Blocking China will help if 1) you don't have users from China and 2) they're the ones consuming a lot of resources.

Aha... shows how little I know about the way the software works!! Thanks... I've learned something. :)

I'll go block China. Pity since we're so close geographically, but I can't let them hog bandwidth like that.

Just on a tangential point... what do they *do* with all that bandwidth?? My stats show one unknown 'robot' made 39,965+496 visits using up 738.84 MB bandwidth on it's own. Any idea *why* or what it might be doing?

Arantor

Well, how do you think Google figures out what's on your site? It visits it. In your case, I suspect you were visited by Baidu, which is notorious for blitzing a site and consuming far more resources than it really should, in the name of figuring out what's on your site so it can 'search' it.

Mind you, 40k page views, over how long a period?
Holder of controversial views, all of which my own.


welshdog

Quote from: Arantor on May 13, 2014, 11:14:19 PM
Mind you, 40k page views, over how long a period?

These are stats for *May*... !!!   A bit overzealous maybe?

Just checked for April...    Unknown robot (identified by 'bot*')   113,760+920   2.22 GB. I think it has to go.

Arantor

Sounds a lot like Baidu, yes. Block it out! :D
Holder of controversial views, all of which my own.


welshdog

Quote from: Arantor on May 13, 2014, 11:46:28 PM
Sounds a lot like Baidu, yes. Block it out! :D

Will do... thanks for the assist. :D

Advertisement: