IcarusD
Forum Replies Created
-
I should add that on the days that the CPU usage shot up, the top processes for each day were all for the WordPress login page.
The 50% was at the peak yesterday (October 16). Once I blocked login attempts from every country outside of North America, the attempts to log in moved to cities in the U.S. like Orlando and Chicago. I ended up blocking one of their IP address in my .htaccess file, and that immediately helped. The average for the day ended up dropping to 29.81% for the day, from a peak at around 54%.
My concern with using .htaccess or Wordfence to completely block an IP address’ access to the site (rather than to just the login page) is that it could then prevent other legitimate people using the same Internet Service Provider from visiting my site.
Here’s a summary of my daily stats. The spike on October 11 prompted me to tighten some of my Wordfence settings. (I can repost these details and more in a new thread if it’s better to not hijack someone else’s post.)
Stats for 17 Oct 2015:
———————————
CPU Usage – %3.78
MEM Usage – %0.03
Number of MySQL procs (average) – 0.14Stats for 16 Oct 2015:
———————————
CPU Usage – %29.81
MEM Usage – %0.21
Number of MySQL procs (average) – 1.06Stats for 15 Oct 2015:
———————————
CPU Usage – %35.19
MEM Usage – %0.25
Number of MySQL procs (average) – 1.23Stats for 14 Oct 2015:
———————————
CPU Usage – %2.01
MEM Usage – %0.03
Number of MySQL procs (average) – 0.07Stats for 13 Oct 2015:
———————————
CPU Usage – %2.06
MEM Usage – %0.02
Number of MySQL procs (average) – 0.07Stats for 12 Oct 2015:
———————————
CPU Usage – %1.94
MEM Usage – %0.03
Number of MySQL procs (average) – 0.05Stats for 11 Oct 2015:
———————————
CPU Usage – %10.92
MEM Usage – %0.08
Number of MySQL procs (average) – 0.43The exact same thing has been happening to me. My CPU usage shot up to over 50% as a result (my hosting company wants me to keep my usage below 2%). I submitted a support ticket with Wordfence with more specific questions regarding settings, etc., but it’s been 24 hours and I haven’t heard back. Would it be better to post those details here (in a new thread)?
Forum: Everything else WordPress
In reply to: External image hosting optionsOh, I apologize, I missed that. I’ll mark this resolved. Please feel free to delete this. Thank you!
Thank you so much for your advice.
I do have Private Photos checked, but my photos are mostly set to Public. The Safety setting, which is different, is set to Restricted for many of them.
Sayontan, I tried adding the code you suggested. (I’ll be curious to see if it only shows Restricted ones or if it also shows ones with a lower safety threshold). It doesn’t appear to have had an effect, however. For the gallery I’m testing with, the same five safe photos show up but the one I marked “moderate” and the other I marked “restricted” aren’t appearing. It didn’t ask me to log in to Flickr to see the other two. (I am currently logged into Flickr in the same browser, so it might have already detected that. But even so, it didn’t display those ones.)
Can you confirm that I placed the code in the correct spot? I’ll paste that part of the code below, but in case that doesn’t work, I also posted a screen capture of it:
http://www.sfgayhistory.com/resources/photonic_flickr.JPG
This is what that part of the code now says:
else if (isset($per_page)) {
$query .= ‘&per_page=’.$per_page;
}if (!empty($page)) {
$query .= ‘&page=’.$page;
}
$query .= ‘&safe_search=3’;
$login_required = false;
if (isset($privacy_filter) && trim($privacy_filter) != ”) {
$query .= ‘&privacy_filter=’.$privacy_filter;
$login_required = $privacy_filter == 1 ? false : true;
}Thank you so much!
I didn’t actually set anything. I’m more of a content guy, with just enough technical skill to get myself into trouble. I think that my hosting company set that limit to throttle my CPU usage because I’m on a shared server and my CPU usage was too high.
Last night I Googled that error message, figured out what it was and how to increase my memory allocation, and gradually raised it until the NextGEN Galleries were working again without that error. (It’s now set to 128MB.)
Then I re-activated the NextGEN plugin but de-activated all of my other plugins.
I didn’t get a ton of traffic overnight, only 210 page views yesterday (I normally average around 1,500 page views a day). But my CPU usage skyrocketed to 12.74% (from around 1.66%). I’m pretty convinced that it’s the galleries that are hogging the CPU. My hosting company naturally can’t allow that in a shared environment, and as this is a hobby site that hasn’t ever generated any income (despite worthless affiliate ads), I can’t afford to upgrade to a dedicated server.
Is there anything I can do to optimize so that NextGEN works more efficiently? I’ve put in so much effort over the last year on the content side, and in increasing my traffic. I would hate to have to scrap NextGEN and migrate to some other gallery option, but I may be forced to.
Any suggestions?
Thank you so much for your response. I have new details that will hopefully help.
I managed to restore access to my site by disabling all of my plugins through the Control Panel. When I did that, my site was completely restored except for things dependent on plugins (the galleries weren’t working, and neither were the ads on my site that are served through the AdRotate plugin, for example).
Before I reverted to a Twenty series theme, I just wanted to see if the site would work with only the NextGEN Galleries working. It did … briefly. Clicking on posts and pages that did not have galleries was fine. If I clicked on a blog post with a gallery, it loaded, but as soon as I tried to paginate (for galleries with more than 20 images), or click on another post with a gallery, I received error messages replacing the text of the post. Here are two examples of the error message (the emphasis is in the original).
Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 262144 bytes) in /home/cosmom2/public_html/sfgaylife/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/datamapper/package.module.datamapper.php on line 1303
and
Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 262144 bytes) in/home/cosmom2/public_html/sfgaylife/wp-includes/wp-db.php on line 1931
I disabled the NextGEN plugin and everything started working fine again (except for galleries not displaying, of course). I clicked around extensively without any problems. But as soon as I re-enabled the NextGEN plugin, the same pattern occurred: the first time I clicked on a post with a gallery, it loaded fine, but I got either the error message above or a completely blank page the second time I clicked on a page with a gallery. I tried this several times, turning on and off NextGEN, always with the same effect.
I then tried running the site with only my AdRotate plugin working, but with NextGEN and every other plugin disabled. It worked fine and I was able to click throughout the site extensively without any errors.
I currently have the site running with every former plugin re-activated except NextGEN, and so far there haven’t been any errors.
By the way, my site was running for over a year using NextGEN Gallery and almost a year with my current theme without problem. This problem flared up last week. I did not install any new plugins before it happened. My hosting company had contacted me for three weeks leading up to this telling me that my CPU usage was too high, but other than that, the site was still functional.
The only thing I can think of is either having over 25,000 photos has overloaded it, or my hosting company has imposed some sort of memory constraints that this plugin is exceeding?
As a follow-up: it appears that my hosting company has now completely disabled my site. Before going back to them, I’d like to have more information about this to discuss with them.
And again, I’m happy to upgrade to NextGEN Plus if it has features that improve CPU usage issues.
Forum: Fixing WordPress
In reply to: "Connection Lost" error messagesThank you. As it happens, my site upgraded to WordPress 4.0.1 last night, and then this morning there was an update for the NextGEN Gallery plugin. Not sure which fixed it, but I don’t appear to be having problems anymore. I’ve bookmarked that link for future reference just in case.
Thank you!