Random http 500 error
-
Hi,
I seems to be getting a lot of random http 500 error messages in the admin. It seems to be associated to woocommerce plugin. When I deactivate woocommerce the error goes away. I am currently using flatsome theme, not sure if the issue us related to one old template that i cannot seem to modify and flatsome seems to be working on it the issue but said they cant commit to a date. I also modified the memory settings. So i can still painfully modify things in the admin with plenty of reloading, but this is slowly me down. Any help would be greatly appreciated.
Thanks,
Eric
-
Hello, Eric. There’s a lot you don’t tell us here. For example, is this shared hosting, VPS, or dedicated server? What is your hosting provider’s operating system? What version of PHP, SQL, & WordPress are you running?
In cases like these I often change WP_DEBUG to ‘true’ in wp-config.php. That’s a security risk, as you’re likely aware, so please change it back when you’re done. Meanwhile, though, you might see what errors, if any, are being thrown.
If you have a VPS or dedicated server, then there are error logs in multiple locations, depending on which server you’re running. There may also be an aplet in your hosting provider’s control panel called ‘errors’ or ‘error logs’. Lastly, there may be files called error_log or error.log in your WordPress folder &/or subfolders. Check to se if they have any relevant entries.
You might also try switching to a default theme to see if the errors go away, but, because of their intermittent nature, these are always tough to troubleshoot. It’s why my hair is short & why I absolutely will not get a talking bird, as they’re entirely able to imitate to the very emphasis on each syllable exactly & correctly what I said in the thick of trying to troubleshoot these sorts of issues.
Please let us know in your next reply the answers to the questions I posed, & perhaps we can be of better assistance.
Hi Jackie,
Thank you for the reply. The website is being hosted on GoDaddy, I listed the versions below. I also activated the logs and I keep getting allocated memory issues, which I had already modified the size limits in the past. The theme just released an update today which I downloaded, the old template has been resolved but I am still encountering the random 500 errors. When I deactivate the woocommerce plugin the errors stops.
Hosting: GoDaddy
Versions PHP:7.2
Versions SQL:5.1.73
Versions WP: 4.9.8When using the debug logs I am receiving a bunch of PHP Fatal errors example:
[28-Aug-2018 13:55:57 UTC] PHP Fatal error: Allowed memory size of 52428800 bytes exhausted (tried to allocate 73728 bytes) in /home/coffeebeans/public_html/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option.phpThe memory size limit is as follows:
max_execution_time: 300
memory_limit: 500
post_max_size: 128
upload_max_filesize: 512Thanks,
Eric
Eric, Thanks for the detailed reply. That error indicates wp-seo fell over in a screaming heap as opposed to Woocommerce. I personally don’t view it as a strictly necessary plugin, but that’s a choice each site owner needs to make.
Do you know if you can set up cron jobs in your Godaddy hosting control panel? Meanwhile, please consider reviewing your plugins & getting rid of those you don’t need. You may also wish to look at your access logs & see if there are visitors trying to hammer your site w/brute force or vulnerability scans, &, if so, to erect some security measures to stop those.
If Godaddy permits cron jobs, then we might try disabling wp-cron in WordPress & running it as a cron job via the control panel instead. This can sometimes help w/these types of problems. You may also wish to set up caching on the site if you haven’t already done so. Since you haven’t provided a site url, it’s hard to know whether that’s been done or not. That can create its own set of problems (I can’t count the number of support requests I’ve responded to where caching was implicated), but if you’ve studied the solution & configured it well, it can be very helpful.
Lastly, you may wish to check your database size & do some thorough house-cleaning, ie, revisions, unnecessary plugin tables, etc. It goes w/o saying–except it doesn’t–that you should back up your database at the start of the process & several times along the way as cleaning measures whittle it down. You never know if the next 1 will make the whole site fall over.
I hope this proves helpful.
Hi Jackie,
Thanks again for your response, I believe it is related to the allocation memory, it is not only the seo error message I received. That was an example. I did indeed do a clean up on my plugins. I currently have only a few activated.
Looks like I can indeed setup cron jobs on godaddy just never did it and not sure what I should set up. I did add a plugin to view the logs and the site does not seem to be getting hammered.
I did not have a caching system set up, however I just put one in place. Will need to configure and yes I know the pains of caching…..
As for the database size, I have used 1 gig out of 100 gigs and all the other metrics are showing as good with no red flags.
I appreciate the follow up.
Eric, if at all possible, please try to get that database size down. That’s surely creating strain on the site. WC transients are often a big cause of this, but revisions, plugin tables, Akismet history, spam comments, & other entries not needed to keep the site running can also contribute to make the database excessively large. So can wp-seo entries, IMO.
Do you perchance have any options using Godaddy to use Nginx as opposed to an Apache server (I assume you’re using Linux, you didn’t really say, & you strike me as one who knows well what you do when you assume :)). But Nginx, when configured properly, can really cut down on memory usage.
In terms of the cron job, what I do is add an entry to wp-config.php per the following:
define(‘DISABLE_WP_CRON’, true);
& then I set it to run every 30-60 minutes in a control panel cron job. This prevents a lot of unnecessary reiterations of wp-cron. Normally I set it to run every hour unless there is a specific need to do otherwise.Hi Jackie,
Sorry for the late reply, I want to thank you for all your help and support. Since this has been a pet project of mine and a start up site with no traffic, I decided to start from scratch. Since I took over the site from someone and did not really know what they added in the backend of things I felt it was already too time consuming debugging so made the executive decision to rebuild. Everything is working fine now π
Eric
Eric, sometimes that just has to be done. Congratulations on that executive decision! You can export the posts & stuff if you’d like, but I think you made the correct choice.
The topic ‘Random http 500 error’ is closed to new replies.