(Randomly when I visit my website it declares “Error establishing a database connection”. I am doing nothing, even on the main page or on the wp-admin. Again it is randomly happening, so do not recommend me an SQL error fix. Everything are configured correctly. I guess Infinity Free Databases go down our something. Anyways, can you give the URL of my database to monitor for a downtime. I need immediate help.)
Main Concern that needs immediate fix as soon as possible
(“Random” Error establishing a database connection error on TMAC PowerStore)
@Admin sorry for mentioning but my issue is really weird. Please do not mark this comment or close this feed as it may sound similar to other threads but mine presents another variation of the other thread.
Really weird now my website shows white screen and loads way way slower but after still loads. Still not sure what caused that Database Error but maybe my plugin WP-Optimize which optimize my database. I will try to disable that functionality to optimize the database and see.
The load time of your website is normal for WordPress with few visitors. Changing hosts won’t really make a big difference, since the issue is with WP Cron, not the database.
As for an explanation for the slow loading, I like this analogy from @wackyblackie to explain it:
Imagine you have an old computer, you want to use it but it is off.
Now you have to wait for it to boot, which can take a while.
But once it’s booted, you can use it, and when it becomes idle, it responds quickly.
Eventually, it shouts off because you haven’t used it in a while, so the next time you want to use it, you must boot it up again.
What you can try is setting up a cron job in the control panel to load your homepage every hour or so. Also, turn off automatic updates, and disable plugins that run in the background, or create background tasks.
On the control panel, find the “Cron Jobs” section. If required, select your domain name from the drop-down. For the URL box, enter “index.php” (I forget the exact location of the cron file since I don’t use WP, but the index file is sufficient to call).
Then enter “1” in the hour box, and “5” in the minute box, then submit it.
It may take a few days to a few weeks before you see a change. If the speed does not decrease, try changing the “5” to a different number (Cron jobs are a bit weird here).
I will try and will post back here if the website will not shutdown I mean like what the quotation means like my site will sleep. If the performance does not improve tomorrow, should I change 5 to a higher or lower number?
So far, all we know is that there is “a database error”. Before we can figure out what’s causing it, we first need to know what the database error is in the first place. As in: the actual error message saying what specifically is wrong with the database connection.
You could, but database connections are very sensitive to latency, so even if you choose the fastest database hosting in the world, then your website will be very slow due to all the queries and data that need to travel to and from the database to your website server.
When I add products on WooCommerce then the Database “Go Down”. Because WordPress says that there is error connecting to thrle database that has an address of I remember byteclusters. But still when just visiting the site and done nothing, there is now no Database Error. The error only appears after adding some information to the database using WooCommerce’s product adder. But after a refresh everything goes normal. Note: The database error now appear on the wp-admin (specifically WooCommerce) only and the main website is running normally. I guess I basically just overloaded the database that causes it to down for a few seconds. @Admin do we have limits on the no. of data that can enter on the database at a single time here at Infinity Free?