Wordpress Critical Issue

I've been experiencing an issue on my Wordpress site where a critical error is prompted and I cannot view the admin portal. As a bandaid fix, I increased the droplet on Digital Ocean and it fixed the issue. I'm assuming this is something plugin related and I'm now paying around $120 to host the site (elementor & woocommerce), which is considerably more than I've been paying. I honestly don't know much about backend / server related stuff. I know how to view server via FTP with key, but don't know how to access logs, etc. I was told to post my question here, but given the context is vague. I was wondering if anyone could help walk me through the process of diagnosing this issue and potentially fixing. Thank you 👍
No description
65 Replies
Joao
Joao14mo ago
Have you recently installed and/or updated any plugins? The fact that the issue went away when you increased the server resources makes me think that there's some process running out of control, for whatever reason that may be, for example something that cannot start properly and keeps retrying, which generates a ton on error logs (this is just a guess).
Matt
Matt14mo ago
I think there might be a memory leak with one of the plugins or something. I uninstalled most plugins used, but the problem was still persisting. I honestly don’t know where to check for logs to even begin diagnosing @joao6246
Joao
Joao14mo ago
So it was working for a while after you upgraded the server and it's now happening again? If you have access to the VPS (not the WordPress admin panel, but the server itself) you may want to check the logs at /var/log/syslog (if it's Ubuntu-based) or /var/log/messages (if it's RedHat-based). If I understand this correctly it sounds like something growing out of bounds... may be that there aren't enough system resources due to a process going haywire and it could be as simple as restarting the server. Either way, there's a good chance that one of the log files inside /var/log is pretty big, like at least a few hundreds and probably few GB of size.
Matt
Matt14mo ago
It’s not happening at the moment since the server upgrade. But this is the second time I upgraded the droplet and the bill is becoming unaffordable tbh I will check for this once I’m back on my PC
ghostmonkey
ghostmonkey14mo ago
you should be able to see in the digital ocean admin panel your resource usage. You can see the baseline with your site fully running, and then disable all the plugins to see the minimum. and From there re-enable the plugins until you find the one that m assively increases it. but also, what did the admin email tell you was the problem? If it's a plugin, it's almost defintely a newly added one, so you should be able to figure it out pretty quickly if it's not a plugin, it could be related to updating wordpress or php or woocommerce itself log in to your wordpress panel, and on the home page is a 'site health status' box with a link to 'site health screen' you can also look there, and any major issues will be listed
Matt
Matt14mo ago
I didn't receive any email about the problem I followed those recommendations previously (update plugins, etc)
Matt
Matt14mo ago
I'm here now in FTP, there's a ton of logs. Do I go through each file? How do I know which to check? https://gyazo.com/042a072fa33dc6050ad5b72048ee0df4
Joao
Joao14mo ago
No, without even knowing what to look for is not a very goo use of time. I was hoping one of those log files would be considerably large in size, which would be a clear indication that a process was misbehaving. This may still be the case but if it's not producing logs is hard to tell. Have you checked resource usage as recommended above? Did you notice this issue after installing or updating anything? I also assume you tried restarting (sorry but I have to ask)?
Matt
Matt14mo ago
it happened over time I'm unable to view resource usage past 14 days
Joao
Joao14mo ago
Anything strange about it during these last 14 days? Increasing steadily without equivalent traffic, peaks of activity, etc? What WordPress and PHP versions are you running?
Matt
Matt14mo ago
Yeah actually
Matt
Matt14mo ago
No description
Matt
Matt14mo ago
No description
Matt
Matt14mo ago
6.3.1 for WP 8.0.20 for PHP Looks like latest version of PHP (8.2) was released last year
Joao
Joao14mo ago
Yeah but 8.0 is a major release and should be fine for now That peak of activity, is it periodic or is only this one time? It could mean a simple update, although it's strange that takes almost 10 minutes
Matt
Matt14mo ago
No description
Matt
Matt14mo ago
this is the 14 day period * previous screenshot didnt update UI 8/30 peak is crazy Keep in mind, I tend to only drive traffic typically in 1-2 month increments, 3 times a year Last major traffic was driven from July 2nd to August 22 (drive traffic as in running ads, etc.)
Matt
Matt14mo ago
No description
Joao
Joao14mo ago
Do you have any backups or automatic updates scheduled to run periodically? That could explain those spikes.
Matt
Matt14mo ago
Also, whenever a solution is found, how difficult is it to migrate Droplets on Digital Ocean? I'm 99% sure you can't downsize, so I'm assuming I'd have to move I don't have automatic backups and my last backup was before 8/30
Joao
Joao14mo ago
I've never used DO in particular but if it's just a single, or even multiple WP sites, should be easy enough if you have backups. Although if it's managed server for you, you should contact with whoever is in charge of it.
Matt
Matt14mo ago
I'm the one who "manages" the site
Joao
Joao14mo ago
Sorry, I mean manages the server itself.
Matt
Matt14mo ago
It's one of my business' websites, I don't know much about the backend processes to be able to maintain this sort of stuff especially when it comes to critical issues that cause site to go down I only upgraded my droplet as a temp fix because the issue occured during a peak promotion time and I had no other options and I'm going to be driving a lot of traffic starting this saturday, so im hoping i can find a fix to prevent future issues & save on this monthly bill because $120/m is insane
Joao
Joao14mo ago
I've been experiencing an issue on my Wordpress site where a critical error is prompted and I cannot view the admin portal.
You mentioned that you couldn't access the admin portal, but were you able to still access the site?
Matt
Matt14mo ago
I can now ever since I upgraded the server But my fix was basically putting a bandaid over a bullethole At the time, I wasn't able to access admin panel because site wouldnt load anything besides that critical error
Joao
Joao14mo ago
So not even as a regular visitor, either?
Matt
Matt14mo ago
Nope If I were to send you my website URL, would that maybe convey any of the issues?
Joao
Joao14mo ago
Not likely, no. If it was only inaccesible for you as an admin, which needs credentials, it could've been a clue that the issue was with the database specifically.
Matt
Matt14mo ago
Good to know I just went through all these log files and didn't come across anything concernming
Joao
Joao14mo ago
Yeah I'm also just going on my own experiences, I had a similar issue but was easy to spot because it produced a ton of error logs. Unfortunately I think the only way to identify the issue is to catch it on the act. So keep an eye on the resource usage, log file sizes, etc for this next few days and see if something is up. It may be worth cheking in Wordpress specific forums.
Matt
Matt14mo ago
It hasn't has any issues since July 27th but I upgraded server considerably so I don't anticipate any issues for a bit
Joao
Joao14mo ago
what is your current RAM usage?
Matt
Matt14mo ago
I don't know how to view that on DO I don't see it anywhere on the dash
Joao
Joao14mo ago
Mmm I'm sure it's fine right now but worth checking it out from time to time as it's directly related to running processes. Do you have access to a terminal for that server?
Matt
Matt14mo ago
Yeah Putty?
Matt
Matt14mo ago
No description
Matt
Matt14mo ago
Is this the memory?
Joao
Joao14mo ago
Yes, that's the one
Matt
Matt14mo ago
Okay I quickly looked up the command free -m
Joao
Joao14mo ago
Looks ok to me, you have 8G and have 6 available Maybe you want to enable some swapping which would help with high peaks of activity
Matt
Matt14mo ago
So what I do remember too is the wordpress error said something like "error establishing database connection"
Joao
Joao14mo ago
I guess it's possible that it did run out of memory or got somehow overwhelmed by too much traffic? This happened during that period you mentioned when you have peak activity, right?
Matt
Matt14mo ago
Yeah but this peak traffic was about 200 visitors per day What I do remember is back last year I had a similar issue with critical error...that stemmed from WooCommerce error where I had to increase memory limit on a php.ini file using putty not sure if this is related
Joao
Joao14mo ago
It doesn't look like a coincidence so it may be
Matt
Matt14mo ago
No description
Matt
Matt14mo ago
This was the exact error I had for establishing db
Joao
Joao14mo ago
I'm starting to think it's a memory issue then Do you have any caching for your site?
Matt
Matt14mo ago
Plugin for deleting cache?
Joao
Joao14mo ago
To serve content from cache, ie., avoid unnecessary queries to the database. So if a visitor comes in and asks for something, and then another comes and asks for the same thing, avoid repeating the same query
Matt
Matt14mo ago
That I'm unsure of How would I check this?
Joao
Joao14mo ago
Most likely in your plugin list, something like WP Total Cache, W3TC, Redis...
Matt
Matt14mo ago
Ah yeah WP Fastest Cache? That's what I have for caching
Joao
Joao14mo ago
Something like that yeah
Matt
Matt14mo ago
Yeah I used that to clear cache at the time
Joao
Joao14mo ago
I think it may be worth to reach out and ask for some advice on how to setup correctly for your site. If anything, you'll learn something that will help anyway How often do you clear it? The whole point is that you want to keep it to speed up responses, and only clear it when something has changed
Matt
Matt14mo ago
I clear it typically once per month when I do my site backups
Joao
Joao14mo ago
Ah, ok that's fine
Matt
Matt14mo ago
Yeah I need to learn more about being able to maintain. I didn’t setup the site, I paid someone to two years ago. But ever since I’ve been the one to maintain Is there anyway to run a website diagnose or something? Similar to say an antivirus Should I downsize the server and then be on the look out for the error again(
Joao
Joao14mo ago
I think you should check if this is the right plugin for a woocommerce site. It looks like it's mostly for static content, but it may not be able to cache queries to the database only static assets. I wish I could tell you more about it but I'm not too sure, maybe over on the WordPress community
Matt
Matt14mo ago
Okay I’ll have to make a post there too Random question, but do you know how to stop loading woocommerce on all pages? I believe woocommerce loads on index page which isn’t a page to purchase on
Joao
Joao14mo ago
I was going to suggest that earlier... you really don't have a choice to be honest 😄 I'm afraid not, never used WordPress beyond basic static sites.
Matt
Matt14mo ago
Ahh okay
Joao
Joao14mo ago
But I remember reading about it somewhere. Static assets (HTML, etc,) are not the same as results from the database and because it may be so different from one visitor to another it's prone to change, and thus hard to cache properly. I'm gonna call it day, sorry I couldn't be of more use I really think the issue must be related to memory somehow, given it only happens on predictable peaks of activity and was solved twice with solutions that increase memory usage right? Could be an issue with caching... maybe not but in any case you will learn something from looking into it so it's not wasted time either way.
Matt
Matt14mo ago
Yeah memory usage increase was only fix I could find Gonna read more about this And no need to apologize, I appreciate you taking the time to help
Want results from more Discord servers?
Add your server