Suspended: Heavy Load Problem?

Having trouble installing serendipity?
Post Reply
mdnava
Regular
Posts: 57
Joined: Wed Dec 15, 2004 10:17 pm

Suspended: Heavy Load Problem?

Post by mdnava »

Hi,

These days I'm getting over 10.000 visits a day on my Blog (http://www.venezolano.web.ve), but I keep getting suspended by my provider, they say the Blog is using too many resources on the server (Dual Opteron, 2GB ram).

Last month the problem was with processor usage, which I solved taking down the PDF Plugin that was the problem.

This time it seems MySQL is the problem, I have deleted most of the plugins I was using, seems deleting Karma helped a bit but still I got suspended twice today.

Before I upgraded from s9y 0.7.1 to s9y 0.8 beta4, things were normal, I never got suspended before.

I just wanna know any thoughs on this...
Melvin D. Nava
Venelogía
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Suspended: Heavy Load Problem?

Post by garvinhicking »

Seems like a well visited blog you have!

However Serendipity does not really take up that much SQL traffic that you could get suspended. Did you install the entryproperties plugin and activate caching in Serendipity 0.8? That may reduce traffic a bit.

Apart frmo that, which plugins do you have installed? Then I can tell if some of them create extra traffic.

Apart from that, ask your provider because of which Queries they suspend you. If they really now that it's you causing the heavy load, they should know which queries are slow (mysql slow query log). Apart from that, check if your Serendipity Tables all have proper primary key indices, as indicted in the db.sql table :)

Regard,s
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
mdnava
Regular
Posts: 57
Joined: Wed Dec 15, 2004 10:17 pm

I deleted old files before upgrading... This are my plugins.

Post by mdnava »

Hi Garvin, thanx for responding,

The current sidebar plugins are only one "HTML Nugget", "Categories" and "Latest Entries".

The event plugins are: emoticate, bbcode, break lines (can't remember name), three "static pages", one "dynamic page" (a PHP Contact Form), entryproperties (cache is on but it seems to only work on new posts) and some others I don't remember... I deleted Karma, Spartacus, PDF and any other not strictly needed.

Also, when I upgraded to 0.8 beta4, I tried erasing all 0.7.1 files and uploading new s9y files (to have kinda of a clean install), but after I tried to open the Blog it crashed and I had to run on mysql each of the "db_update_xxx" files inside the sql folder since "alpha1_0.8-alpha2" to make s9y work.

After I looked the database with MySQL Control Center I found this index that don't appear to be on db.sql:

table: blog_comments
> FULLTEXT KEY `body` (`body`)

I'll appreciate any comments...

(Offtopic: It would be cool if s9y could detect when database exists but previous serendipity_config_local.inc.php doesn't)
Last edited by mdnava on Thu May 05, 2005 8:26 am, edited 1 time in total.
Melvin D. Nava
Venelogía
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: I deleted old files before upgrading... This are my plug

Post by garvinhicking »

Okay, the plugins you have are really non-problematic.

When you said by upgrading the "blog crashed", what exactly do you mean? The blog can only upgrade with the serendipity_config_local.inc.php because in that file the DB access is inserted and the installed version. Without that, an upgrade cannot be made - so the DB alone is sadly not sufficient to make an easy upgrade.

The fulltextkey which you say is missing in DB.sql is in fact substituted by a special {MYSQL_FULLTEXT} prefix which is later replaced to put in the proper key.

The SQL file you gave basically looks okay. There would be minor key modifications which could speed up the blog a tiny bit, but that would be speaking about 2-3% performance. So this would not really be causing the trouble on your blog. I'm sorry but all left to suggest is to talk to your provider people and let them tell you the slow queries.

Regarsd,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
mdnava
Regular
Posts: 57
Joined: Wed Dec 15, 2004 10:17 pm

Clean Install (what a long night)

Post by mdnava »

Hi Garvin,

When I said "crashed", I meant it didn't work at all, I just got an error but as you say, without the config file it won't upgrade even if there is already a database... It was solved by executing manually the required SQL files.

About my problem, I just finished doing a clean install of s9y beta6:

- Backup of everything (DB, files and folders)
- Every PHP file was deleted
- The entire database was dropped
- The new beta6 was uploaded
- A new database was created
- A clean and empty s9y was installed
- I had a long session making SQL inserts (from backups) of my categories, entries, entries_cats and comments, but nothing else (I noted minor column diffs between beta4 and beta6).
- I added some basic plugins and modified my usual stuff.

So far so good... I'll let you know how it goes... Thanx a lot!!
Melvin D. Nava
Venelogía
nohn
Regular
Posts: 37
Joined: Fri Oct 08, 2004 3:28 pm

Post by nohn »

Just install new versions over the old ones. Databases upgrades and file cleansups will be done automatically.
mdnava
Regular
Posts: 57
Joined: Wed Dec 15, 2004 10:17 pm

Not quite!

Post by mdnava »

nohn wrote:Just install new versions over the old ones. Databases upgrades and file cleansups will be done automatically.
Not quite, I had until yesterday DB stuff from older s9y vers. And many tables were too long, for example: referers, karma, comments and entries_properties. Since I might had some bad indexes this could had some side effect on my resources...

Regards, :D
Melvin D. Nava
Venelogía
mdnava
Regular
Posts: 57
Joined: Wed Dec 15, 2004 10:17 pm

Thank you very much Garvin...

Post by mdnava »

Hello Garvin,

I just wanted to thank you very much for your help last month, after I did what I posted before I did not have any more problems until two days ago when it "seems like" MySQL crashed after a big number of people came at the same time to visit.

Then... I found on Spartacus the ¿new? Simple Cache Plugin which seems to have boosted performance a lot, I know is too early to say but it looks like server load has lower several points.

The simple cache had some problems showing Adsense when the "google_alternate_color" property is set, it looks like it gets cached that way and doesn't show more ads but this didn't happened when I tried the pages with FireFox, only on IE and Maxthon.

I think I solved that one by deleting the Adsense "google_alternate_color" property and the "index.tpl" cache in the "template_c" folder, so it could get generated again...
Melvin D. Nava
Venelogía
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Thank you very much Garvin...

Post by garvinhicking »

Mdnava, thanks a lot for telling me this! I also run the plugin on my site and seem to be having no problems so far.

Actually it's strange that the GoogleAd could cause trouble; it's only JavaScript and executed on Client side, so basically it shouldn't cause wicked behavior in cachesimple mode only; should happen in the "usual" mode as well?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
mdnava
Regular
Posts: 57
Joined: Wed Dec 15, 2004 10:17 pm

Re: Adsense issue...

Post by mdnava »

garvinhicking wrote:Actually it's strange that the GoogleAd could cause trouble; it's only JavaScript and executed on Client side, so basically it shouldn't cause wicked behavior in cachesimple mode only; should happen in the "usual" mode as well?
Yeps man!!, quite extrange... I though the same thing about client side javascript, but...

I was writing you a response, but I just found out that Adsense hasn't been showing up again, I deleted the "cache simple plugin" and it works fine... Maybe is caching the Adsense as well, I can't tell right now...

Regards,
Melvin D. Nava
Venelogía
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Adsense issue...

Post by garvinhicking »

Could you compare the HTML output of your page once without the cache plugin and once with it? Basically it should not be any different, but maybe it is and then I could debug it?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
mdnava
Regular
Posts: 57
Joined: Wed Dec 15, 2004 10:17 pm

Re: If I get the same blanks I'll save the source...

Post by mdnava »

garvinhicking wrote:Could you compare the HTML output of your page once without the cache plugin and once with it?
Sure, I just activated "Simple Cache" again (can't live without it) and is working good so far, if I get the same blanks I'll save the source and post a reply here.

I noticed that "Smarty" implements caching for templates regardless of the "Simple Cache plugin", maybe has something to do with it.

Have a nice day!
Melvin D. Nava
Venelogía
mdnava
Regular
Posts: 57
Joined: Wed Dec 15, 2004 10:17 pm

Persintant problem with Adsense and Simple Cache

Post by mdnava »

Hi Garvin,

The problem with Adsense persists, it won't show up at some point but the source code seems to be exactly the same before and after.

Four things to consider about this issue:

1. Seems to happen with IE based user agents, FireFox will still show ads even when IE doesn't... But, 95% of my visitors use IE so you would understand my concerns.

2. This problem still happens even if I delete all cached files under the "template_c" folder to be regenerated.

3. Source code for Adsense seems to be just the same before and after the problem, just won't show up ads at some point unless the plugin is deleted from admin.

4. I noticed the plugin caches some binary files on "template_c" after I tried editing some of them on Notepad... Still don't know what that means for this issue.

-----------------
The simple cache plugin has a positive impact on performance :D, I'll keep trying to figure this out but for now I'll have to delete the plugin :(.
Melvin D. Nava
Venelogía
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Persintant problem with Adsense and Simple Cache

Post by garvinhicking »

After your descriptions, it means that the plugin is not the reason for why your AdSense code fails, I think! If the HTML code is the same like before without the plugin, it can't really be it. Especially if FireFox is not causing the trouble.

Did you look out for any JavaScript errors in your IE6?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
mdnava
Regular
Posts: 57
Joined: Wed Dec 15, 2004 10:17 pm

Re: Persintant problem with Adsense and Simple Cache

Post by mdnava »

garvinhicking wrote:Did you look out for any JavaScript errors in your IE6?
Yes I did and there was no js errors just the blank space, but more important:

1. I asked two more friends on different places to open the page and look for Adsense, they did not see it as well.

2. On thursday, Adsense registered as low as 25% impressions of a regular day, so this was in fact happening.

3. The ads did appear some times, it seemed to me (but not for a fact) that after the first empty Ad it stopped showing more ads.

4. Adsense works just fine when I delete the "Simple Cache" plugin, the next day (friday) I even broke one record for impressions.

Another thing to have in mind is that Adsense was working fine with "Simple Cache" until I changed some Ad formats inside the templates, but I still can't say if this is related or even if I'm missing something else I did that day.

Have a nice day Garvin,
Melvin D. Nava
Venelogía
Post Reply