PDA

View Full Version : Issue related to MySQL, Throttling and WordPress



Adolfo
03-01-2011, 08:46 PM
Hello,

I have searched and found several topics related to issues with WordPress' latest updates, I have installed WordPress in one of my sub-domains and noticed it received like 1-3 visits a day for the past months.

However, I stopped posting, since it is kind of anoying, takes too long to load alone, as other users have pointed out, I had no fancy plugins added, nor themes, I actually ended up deleting WordPress from my account today because of this:

On the past months, I have been having MySQL issues (I have been in bluehost for over 5 years with different domains and accounts so I know this is not normal).

I am working on a new website ( http://rc.red-esign.net ). I have scripted it my self and have optimized it several times... With only 3-10 users online at once in my Website in between 15 minutes interval and with a maximum of 3 mysql connections per user when loading a page (due to the chat or a "wish list" widget that gets updated with 10 sql rows every 20 seconds).

I have some times reached the maximum connections allowed, and this is due to VERY slow queries.

I can't seem to understand the MySQL Support, I have contacted them through tickets and even the chat, and all they say point to the WordPress installation as well as my e-mail service, which is using roundcube.

I have detected throttling with nothing else than 3 users per hour online at once of over 2000 seconds of throttling.

I have disabled / deactivated all my other web sites to find out if there's an issue with those, but they seem to not affect, 3 of my web sites do not use databases at all, though they are flash web sites, so I'd not be surprized if that was the reason of the throttling, however, those websites do not get any kind of heavy traffic as of my Piwik records (probably one or two visitors a day, yes VERY lame traffic for those).

One of my websites (my new website) is the only site available for now (all the others are not loading, I have blocked them from loading to test my theory).

On my last 24 hours my server's CPU has throttled a lot, and I don't really see a reason for it:
* During the past 24 hours your account has been throttled for a total of 13435.407 seconds.

I do not have any kind of heavy scripts, nor massive traffic for now, not even huge databases with over 1kk entries, the website is pretty new and even optimizing it and using as many ways as possible to avoid taking out information from the databases I receive logs of queries taking over 5-9 seconds to run when updating / loading 1 single row.

I mean, seriously? is that even possible?

I have contacted MySQL support as I said before, but they seem to point fingers at me, when everything was fine few months ago.

Note that my main website has been online for over a year and nothing like this happened in that time.

Just recently, since Bluehost has been going down for extrange reasons (check your Twitter from time to time would you?).

This is an example of what I get (database names will change, just saving the structure to give you an idea, as well as times.)



# Mon Feb 28 23:44:16 2011
# Query_time: 5.528687 Lock_time: 0.222399 Rows_sent: 1 Rows_examined: 1
use restaurantcitydatabase;
SELECT `username` FROM `registeredusers` WHERE `userid`='4'

# Mon Feb 28 23:44:18 2011
# Query_time: 3.658475 Lock_time: 1.947527 Rows_sent: 1 Rows_examined: 1
use restaurantcitydatabase;
SELECT `accesslevel` FROM `registeredusers` WHERE `userid`='1' LIMIT 1

# Mon Feb 28 23:44:19 2011
# Query_time: 3.020017 Lock_time: 1.690239 Rows_sent: 1 Rows_examined: 1
use restaurantcitydatabase
SELECT `username` FROM `registeredusers` WHERE `userid`='34'

# Tue Mar 1 03:02:37 2011
# Query_time: 4.259090 Lock_time: 2.958561 Rows_sent: 1 Rows_examined: 1
use restaurantcitydatabase;
SELECT * FROM `registeredusers` WHERE `username` LIKE 'Test' AND `password` LIKE '--INSERT MD5 STRING AS PASSWORD--' LIMIT 1

# Tue Mar 1 03:02:41 2011
# Query_time: 3.562897 Lock_time: 0.000182 Rows_sent: 0 Rows_examined: 54
use restaurantcitydatabase;
SELECT * FROM `registeredusers` WHERE (`ip` LIKE '-- INSERT A RANDOM IP --' OR `userid`='1') AND `isbanned`='1' LIMIT 1

# Tue Mar 1 03:18:34 2011
# Query_time: 2.342400 Lock_time: 0.025602 Rows_sent: 0 Rows_examined: 0
use restaurantcitydatabase;
INSERT INTO `mywishlist` (`userid`,`itemid`,`itemtype`,`itemquantity`) VALUES ('52','20','12','1')


# Tue Mar 1 08:55:13 2011
# Query_time: 8.058323 Lock_time: 0.000094 Rows_sent: 0 Rows_examined: 1
use restaurantcitydatabase;
UPDATE `registeredusers` SET `active`= CURRENT_TIMESTAMP, `section`='search_results', `ip`='-- INSERT RANDOM IP HERE --' WHERE `userid`='27' LIMIT 1


As you can see, they are simple, basic, 1 row related queries, yet look at the last one! God! over 8 seconds to do it? SERIOUSLY? You must be kidding me.

And no, I do not have any kind of massive loops or whatever else that could be causing the slow queries, I am sure something is wrong and it is not my scripting.

The current processes is empty yet the throttling keeps going higher and higher every time.

Any suggestions?...
I do not want these issues to happen when I get over 100 users online at once... seriously... I'm sure it is an issue on Bluehost's end, my past years of hosting with bluehost were perfect, no complains, but since few months ago, it has been a continuous headache.

Do not tell me, it's WordPress anymore, I have deleted it completly, it's useless and uses more resources than what it really should use, even uploading an image is complicated in WordPress, I saw over 600 images being deleted from my posts and I did not really had my life story posted...

Thank you and hope there is a fix for this, I can't really afford 300 euros a month for a dedicated hosting for a website this simple.

And yes, I have a copy of this same web site in my computer, which I run with xampplite for debugging purposes. And no, I do not have any issues.

I want to continue with bluehost since it has been great since the beggining, but God please do something about the servers, they're getting literally destroyed.

Adolfo
03-03-2011, 09:33 AM
Well I finally got a nice, researched reply.

Thank you BlueHost for that, now I can breathe and stop being throttled my self by my clients (hahaha)

extreme
03-03-2011, 11:08 AM
So what did Bluehost have to say about all of this?

Adolfo
03-04-2011, 12:12 PM
I don't know if I am allowed to post what I was told, but I can say something to bluehost.

Trust your customers, something like this wont take real customers away, however if you guys keep pointing fingers and not really solving issues, well that will take people away ;) (hence why even if the renewal rates are higher and asked about that, I know bluehost is worth it).

Since I got the reply, my CPU throttling went down dramatically. From 13435.407 seconds / 24 hours to maximum 207 seconds, that I believe is still within the normal / non critical rate.

Thank you so much ^ -^

Also I have received more traffic in the last 3 days, according to Google Analytics 1.526 page views & 151 visits.

I stopped using Piwik, it seems to use a lot of memory too, is this true (or could that have Piwik be the issue first of all? who knows.)

Anyway, whatever it was, my throttling went down like crazy and I'm happy with that, now we just need to be patient to receive accurate mysql slow queries.

tlkuhn
06-10-2011, 09:28 AM
OK, I've been getting the same throttling issues, so what do I have to do to eliminate this problem?
p.s. What is Piwik?

farcaster
06-10-2011, 09:35 AM
What is Piwik?

Piwik is an open source Web Analytics Program --> http://piwik.org/

tlkuhn
06-10-2011, 11:41 AM
Thanks for the explanation on Pikwik.

Now, is there anybody that can help me with my throttling issue? Or, is this something I don't need to worry about?

wkevco
06-12-2011, 04:53 AM
I don't know if I am allowed to post what I was told
Why not? Could you at least provide what the cause/solution was? It may help others here. :)