1 cutter Aug 31, 2005 21:33
3 elpie Sep 01, 2005 06:16
Also check your server logs for signs of bot activity. Googlebot has been particularly active lately and there are reports all over the Net from people who have max'ed out their bandwidth due to googlebot. Bots like googlebot and Inktomi affect programs running on MySQL (seperate to the banswidth issue) because they don't handle session variables very well. Because they don't accept cookies, each page view generates a new session.
If you see that bots have been visiting a lot of pages and that this coincides with your session problems, then there is not much you can do except block those bots until they start behaving themselves again.
Your host really MUST give you access to your logs. There is no way you can effectively manage bots, including spambots, unless you know what they are doing. If you host just arbitrarily disables your account without letting you see what is actually happening with it, I suggest you get a new host.
4 kwa Sep 01, 2005 07:58
Cutter wrote:
My host is claiming that excessive queries are being made to the SQL database and has suspended my account until I can resolve the issue. It's odd that this problem is cropping up now as the blog has been active for almost a year and just now it's supposedly causing problems with the SQL server.
Has anyone else had this problem? Any insight as to why the queries are being made. I don't have access to their logs - convient don't you think? - so I can't give more details.
I encountered similar CPU performance issues lately with "only" 1,500 unique visitors and 2,000-5,000 page view a day. In order to reduce CPU usage (my host was urging me to), I tried the following solutions:
EASY: I reduced the Auto prunning of old stats (see the [url=http://forums.b2evolution.net/viewtopic.php?t=5245]CPU Usage Reduction Hack: Auto pruning of old stats[/url] thread [url=http://forums.b2evolution.net/viewtopic.php?p=24941#24941]EdB just told about above[/url]). In my conclusion, I noticed that hack "can reduce your b2evolution (0.9.1x) blog's CPU usage by about 32%."
TRICKY: As noticed in the [url=http://forums.b2evolution.net/viewtopic.php?t=5243]CPU Usage Reduction Suggestions: Antispam[/url] thread, if you already block spammers using a .htaccess file, you don't have to do it again using [url=http://b2evolution.net]b2evolution[/url] PHP scripts. Using .htaccess is about 30% quicker and blocks spam, while using default [url=http://b2evolution.net]b2evolution[/url] PHP scripts is slower and only filters the hitlog (the pages are still generated).
EASY: Remove any unneeded features from your blog's skin. Remove statistics, last referrers and other (useless?) features.
EASY: If your blog suffer from spam, consider using the [url=http://forums.b2evolution.net/viewtopic.php?p=23293#23293]BlockUntrustedVisitors()[/url] hack. It's cheap (about 5-10 times quicker than default [url=http://b2evolution.net]b2evolution[/url] PHP scripts, depending of the DNSBL services you use and your server location as well as your blog's server speed). However, it doesn't have the same features as the default [url=http://b2evolution.net]b2evolution[/url] antispam blacklist.
EASY: If your blog does not suffer from spam, empty your antispam blacklist and fill it again with the only keywords you know spam your blog. That can greatly reduce your CPU usage. If you use a .htaccess, consider blocking some often spamming domains (.ru and .biz are two examples).[/list:u]
After applying all of the above suggestions, I reduced my blog CPU usage by a factor of six (according to my host.)
The following two other ideas can also greatly reduce your CPU usage:
EASY: The [url=http://blog.lesperlesduchat.com/dev.php/2005/07/31/b2evolution_search_engines_optimization]b2evolution: Search Engines Optimization[/url] article discusses how to improve search engines indexing of your blog articles so the search engine driven visitors don't come to year summaries or so (displaying all the posts of a whole year is CPU consuming and many search engines prefer those pages of single articles when both are indexed).
[*]TRICKY: The [url=http://forums.b2evolution.net/viewtopic.php?t=4672]Simple Cache Hack[/url] is fine for high traffic blogs, since it serves (almost) static pages instead of fully dynamic ones. It helped to reduce my blog CPU usage by up a factor of six (according to myself).[/list:u]
Can't say for sure, but there are two threads that discuss heavy server loading and both found the same problematic query. Basically auto-pruning old hits calls an sql query every time you get a hit, so a popular blog will run that query very often.
http://forums.b2evolution.net/viewtopic.php?t=5245 has a nice hack that limits the frequency of running that particular bit. If done you will only auto-prune once every 16.66 minutes if you happen to get a visitor at the right time in seconds. Who cares if it does or doesn't since you will get a properly timed visitor eventually.
http://forums.b2evolution.net/viewtopic.php?t=2732 has a solution I used to use where it only auto-prunes I have happen to be the visitor making the hit. I've since stopped logging all hits from me and therefore chose to make that little sub-routine be it's own function. Again called when I'm logged in and visit my blog.
Other things you should be aware of is spammers killing you with hits. I hope you keep your antispam table up to date because hits from a banned keyword will not trigger reach that portion of the log_hit() function. There are methods you can find in the Plugins and Hacks forum Fighting Spam subforum that will even further reduce the work your server has to do in order to shut out the spammers.
Hope it helps!