User | Post |
6:07 am June 26, 2012
| Financial Samurai
| | |
| Admin
| posts 1803 |
|
|
|
Howdy Folks,
I've got a large 2 gig database file which seems to be clogging up all the MYSQL connections, which ultimately causes a "Error Connecting To Server" database error that brings down Yakezie.com once a month on average. I've got to then call and ask them to fix it.
Some questions for the technically savvy:
* Would manually resetting the server and MySQL BEFORE it goes down be akin to shutting down your computer to reset the cache and speed it up? I'm thinking latent connections stick around, building up over time to the point where eventually things come to a halt. I know resetting can't hurt. Just wondering if it is effective to reduce downtimes.
* I've pinned down the exact database file that's causing the downtime. Any specific suggestions on how to optimize the database?
* My host has upgraded my MYSQL connections from 30 to 200. Curious to know how many you have on average, as I asked for more, and he said 200 is the max.
* How often does your site go down on average a year?
Cheers,
Sam
|
Regards,
Sam
Financial Samurai - Helping you achieve financial freedom sooner, rather than later.
Yakezie Network Founder
|
|
12:44 pm June 26, 2012
| Eric – PersonalProfitability.com
| | Portland, OR | |
| Member
| posts 2120 |
|
|
|
Try the WP-Optimize plugin. It did a lot the first time I ran it, but not much after that. If you run it every month or so, it can make a difference.
|
|
|
1:32 pm June 26, 2012
| Financial Samurai
| | |
| Admin
| posts 1803 |
|
|
|
Eric – NarrowBridge.net said:
Try the WP-Optimize plugin. It did a lot the first time I ran it, but not much after that. If you run it every month or so, it can make a difference.
K, have installed it and we'll see.
Whatcha think about resetting the Mysql and server every couple of weeks as a preventative solution though?
|
Regards,
Sam
Financial Samurai - Helping you achieve financial freedom sooner, rather than later.
Yakezie Network Founder
|
|
1:36 pm June 26, 2012
| Eric – PersonalProfitability.com
| | Portland, OR | |
| Member
| posts 2120 |
|
|
|
It couldn't hurt. That should only be an issue if there is some sort of memory leak in the program. An efficient server/software setup should take care of that.
|
|
|
3:52 am June 27, 2012
| MoneyBeagle
| | |
| Member
| posts 1466 |
|
|
|
Eric – NarrowBridge.net said:
Try the WP-Optimize plugin. It did a lot the first time I ran it, but not much after that. If you run it every month or so, it can make a difference.
I'm going to try that today on my install.
|
|
|
1:57 pm June 27, 2012
| Eric – PersonalProfitability.com
| | Portland, OR | |
| Member
| posts 2120 |
|
|
|
Sam, did the optimize plugin cut your DB size down?
|
|
|
1:59 pm June 27, 2012
| Financial Samurai
| | |
| Admin
| posts 1803 |
|
|
|
Eric – NarrowBridge.net said:
Sam, did the optimize plugin cut your DB size down?
Donno. I'll have to take a look later. Just activated it. Swamped. Hope it does!
|
Regards,
Sam
Financial Samurai - Helping you achieve financial freedom sooner, rather than later.
Yakezie Network Founder
|
|
10:22 am June 28, 2012
| Eric – PersonalProfitability.com
| | Portland, OR | |
| Member
| posts 2120 |
|
|
|
It only takes about 10 seconds to run once it is installed. Super automated.
|
|
|
11:10 am June 28, 2012
| OneCentAtatime
| | Florida, USA | |
| Member
| posts 1778 |
|
|
|
thanks for this, as per the report it just cleaned up 2.5GB space including removing post revisions. Great tool Wait for webmaster to report load time change.
|
|
|
11:19 am June 28, 2012
| Eric – PersonalProfitability.com
| | Portland, OR | |
| Member
| posts 2120 |
|
|
|
I use a tool called P3 Plugin Profiler (from GoDaddy) to help me manage load times overall. I got it down about 50% getting rid of the worst offenders.
|
|
|
12:22 pm June 28, 2012
| MoneyBeagle
| | |
| Member
| posts 1466 |
|
|
|
OneCentAtatime said:
thanks for this, as per the report it just cleaned up 2.5GB space including removing post revisions. Great tool Wait for webmaster to report load time change.
I ran this but didn't remove post revisions because I had this awful feeling that it would remove all my posts. What exactly does this do?
|
|
|
1:54 pm June 28, 2012
| Dividend Ninja
| | Vancouver B.C. | |
| Member | posts 198 |
|
|
|
Post edited 1:59 pm – June 28, 2012 by Dividend Ninja
Hey Sam,
I haven't been around in a while. But I noticed Yakezie is loading much faster this morning, I haven't seen the site load this fast in ages. So whatever you did – good job :)
My web provider does indeed reset the cache regularily, this helps a lot, and I am not a high traffic site. MySQL is pretty tough and robust, it can handle thousands of requests. You can ask your web host to increase the "Number of MySQL Connections" available past the default since you are obviously exceeding it.
You could also upgrade your server to more RAM to handle the CPU load, and I assume if you are not already hosting on a VPS or better yet a dedicated server (so its only your site loading) etc.- the usual stuff.
You can also optimize your WordPress code in your header file (header.php), by reducing the number of calls to the DB. This will help tremendously for a large traffic website like yours. See this article:
http://cleverwp.com/speed-up-w…..ader-php
( /speed-up-wordpress-header-php )
For example, the header file repeatedly calls up this function <?php bloginfo('template_directory'); ?> a few times in the header file (about 4 or 5 times). That's fine for the average blogger, but multiply that by the number of users on your site = 100's of calls to the DB (if not thousands) at any time. Calling up the function once and replacing it with a hard-coded variable will help a lot.
Also WordPress wasn't really designed to handle something like a big community forum, that in itself will slow down the site. What I would suggest is splitting the site on two servers with two installs, one for the Yakezie Site and one for the Forums. I have no idea how to do it, but big sites obvously split up the site on multiple servers (they also mirror servers but that is beyond any of us).
Cheers
Avrom
|
|
|
2:05 pm June 28, 2012
| Dividend Ninja
| | Vancouver B.C. | |
| Member | posts 198 |
|
|
|
You could also upgrade your server to more RAM to handle the CPU load,
What I meant to say was
You could also upgrade your server's PROCESSOR to more RAM to handle the CPU load,
|
|
|
2:37 pm June 28, 2012
| OneCentAtatime
| | Florida, USA | |
| Member
| posts 1778 |
|
|
|
MoneyBeagle said:
OneCentAtatime said:
thanks for this, as per the report it just cleaned up 2.5GB space including removing post revisions. Great tool Wait for webmaster to report load time change.
I ran this but didn't remove post revisions because I had this awful feeling that it would remove all my posts. What exactly does this do?
All those saves/updates you do while editing your posts, actually create a new revision entry. Suppose you write a post and hit 5 saves in between while it was in draft state, and then after publishing you found a mistake and updated once. WP would create 5+1+1 = 7 post revisions. Only the final one is in published status rest all occupy space.
In just 1 year and 3 months and 278 posts, I had 2100 revisions which the plugin removed, you can say I removed those many posts, that's a huge space. And my blog is running fine with 0 post loss. G ahead use this option.
|
|
|
4:51 pm June 28, 2012
| Financial Samurai
| | |
| Admin
| posts 1803 |
|
|
|
Post edited 11:22 pm – June 28, 2012 by Financial Samurai
Avrom, thanks for your thoughts. I think the load time was just in your mind, b/c I didn't run any process yet!
My host upped my MySQL connection from 30 to 200. When I asked for them to raise it more, they said that was it. Do they have the ability to do so, but just don't want to? Or is it a technical limitation? How many do you have?
I just ran the WP-Optimize plug-in and it worked, then Yakezie.com went down for 5 minutes.
Has this happened to anybody? Or is this just coincidence.
I better run the plug-in for Financial Samurai way late into the night just in case the site goes down again.
|
Regards,
Sam
Financial Samurai - Helping you achieve financial freedom sooner, rather than later.
Yakezie Network Founder
|
|
8:33 pm June 28, 2012
| MyJourneytoMillions
| | |
| Member
| posts 1012 |
|
|
|
I had a couple problems with plugins and I shut them all down and turned them on one by one – once I found the offender my site started to load quicker. If you'd like some help doing it I'd be happy to help
|
|
11:25 pm June 28, 2012
| Financial Samurai
| | |
| Admin
| posts 1803 |
|
|
|
Just ran the WP-Optimize plugin for Financial Samurai at 11pm PST and as soon as I executed the draft post purge, the site went down for about 8 minutes. Cleared 26,000 posts.
Hence, if you plan to run WP-Optimize, do so late at night when your traffic is lowest. Your site may go down, and you will wonder how the plug-in works if the site is down, but it is working.
I'll run the plug-in once a month from now on. Thanks for the tip Eric. Hope it helps speed and prevents sites from crashing!
|
Regards,
Sam
Financial Samurai - Helping you achieve financial freedom sooner, rather than later.
Yakezie Network Founder
|
|
5:05 am June 29, 2012
| MoneyBeagle
| | |
| Member
| posts 1466 |
|
|
|
OneCentAtatime said:
All those saves/updates you do while editing your posts, actually create a new revision entry. Suppose you write a post and hit 5 saves in between while it was in draft state, and then after publishing you found a mistake and updated once. WP would create 5+1+1 = 7 post revisions. Only the final one is in published status rest all occupy space.
In just 1 year and 3 months and 278 posts, I had 2100 revisions which the plugin removed, you can say I removed those many posts, that's a huge space. And my blog is running fine with 0 post loss. G ahead use this option.
Good info, thanks! I'll probably run a backup first just to be sure.
|
|
|
5:08 am June 29, 2012
| MoneyBeagle
| | |
| Member
| posts 1466 |
|
|
|
Financial Samurai said:
Just ran the WP-Optimize plugin for Financial Samurai at 11pm PST and as soon as I executed the draft post purge, the site went down for about 8 minutes. Cleared 26,000 posts.
Hence, if you plan to run WP-Optimize, do so late at night when your traffic is lowest. Your site may go down, and you will wonder how the plug-in works if the site is down, but it is working.
I'll run the plug-in once a month from now on. Thanks for the tip Eric. Hope it helps speed and prevents sites from crashing!
My guess is that the first time run will do the most, and so if there is a downtime, you'd probably have much less on subsequent runs.
|
|
|
6:57 am June 29, 2012
| Dividend Ninja
| | Vancouver B.C. | |
| Member | posts 198 |
|
|
|
Sam, your site loads real fast in the mornings. Right now its fast, and it was yesterday morning as well. Then during the day it completely slows down. Have a look at that info on optimizing the WordPress Header – it will help. ;)
Eric, thank you for the tip on WP-Optimize, this looks like a great plugin! I'm sure I have so many revisions I don't need anyore on the Dividend Ninja. Thanx for letting us know.
Cheers
|
|
|