[Solved] new image plugin is trashing my site.
When I activate the new embedded images plugin vs. 1.1, I end up with huge errors and get locked out of my site due to the database getting wasted.
Here is what I see in my server logs:
Here is what I see in my server logs:
I am 100% locked out of my website. It is so bad that I cannot even
get into phpmyadmin. Looking at my server error logs I have millions of
the following that just started last night for reasons I have no idea
why…
error:
What do I do to fix this?
I have tried renaming the plugins folder, deleting all plugins, everything short of wiping the database which is NOT an option.
1 | WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query |
Comments
That seems like quite an extreme measure and not a great way of storing info in the database.
Surely, there is a better way of doing this?
For me, the embedded images plugin installed thousands of entries in my WordPress Cron schedule. These remained even after I deleted the plugin. This issue may now have been rectified as I installed it in 2013 yet the cron jobs were still there in 2015 unknown to me. Cron job bloat is more than likely the cause of your fatal memory errors (or was when you posted in 2013). By the way, I'm a happy Tribulant customer using both the checkout and newsletter products on my site.
Here is a step-by-step method for deleting thousands of old cron jobs and may be of use to someone else.
I logged on to phpMyAdmin. I clicked on my database and then the 'search' tab. I typed in 'cron' then selected 'all tables' and clicked 'Go'. I scrolled down the search results list to my wp_options table. I clicked 'Browse'. At the top of the list was option_name 'cron'. I clicked 'Edit' then waited for the page to load. I clicked on the box that showed the list of cron jobs. The cron list was so long that it took about 80 seconds for my cursor to respond. I then used Ctrl-A on the keyboard to select all before hitting the delete button. It took about 2 minutes before my browser completed the deletion (chrome timed-out so I tried Firefox which worked).
After another couple of minutes the cron jobs for my current active plugins re-populated the list. There were 9 cron jobs (down from over 29,000!). Six years of duplicate cron jobs from badly coded plugins, some of which I just installed for a day to try out. Also hundreds from common plugins such as Wordfence, BackupBuddy, Nextgen Gallery, and AutoOptimizer - all of which I had uninstalled in the past. My site now loads like it's been turbo-charged. The admin area is much quicker. Admin timeout errors have disappeared. I had spent so much time on optimising my website trying to decrease the load time. I even moved hosts and upgraded my hosting plans. Nothing increased the speed of my site like deleting all the outdated cron jobs. Mobile download time decreased from 20 seconds to 6 seconds. Desktop download time decreased from about 12 to 4 seconds.
In my search for a solution I found very little information on the effect of cron jobs on website performance. Many said it made little difference and for a small number of cron jobs that's true. But years into the life of a WordPress site I wonder how many are bloated with hundreds if not thousands of old cron jobs from deleted plugins. Instead of asking users to check their php memory limit I would suggest that developers first ask users to check the number of cron jobs in wp_options when problem-solving fatal memory errors. You may be surprised/shocked at what you find! :-)