New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Cpu vs RAM for Mysql Server.
styxtrooper
Member
in Help
For a WP site with lots of posts which is a bottleneck that causes "Error Establishing a Database Connection"?
Comments
Cache and MySQL optimization.
But, WordPress wise, the most probable cause is a bad plugin - one egotistic piece of shitware that slows everything.
Disable all plugins and see if that works.
Then, enable one by one, spaced by some hours or days and find which one is the culprit.
I too had a site that was getting too slow and whatever (not WordPress).
After reading about MySQL optimization and tweaking my.cnf, I didn't needed a new server, I've allocated more resources to MySQL (RAM essentially), and that solved almost every slowness.
And here's another, if your site isn't very dynamic.
WP static + bunnycdn
Make a Galera cluster, scale it when needed. Try https://cloudjiffy.com/ for your Wordpress. I've seen it running smoothly like butter
@DrCornFlakes I'll look into my.cnf optimization. thanks.
@cazrz My site has very minimal images and very slim css and js, its mostly query heavy with lots of custom taxonomies and acf fields.
@BharatB I'll look into galera cluster, but I still have have no idea should the new cluster have high cores or ram.
Cache + Wp static + bunnycdn
Or try Redis/Memcached
It all depends on the type of operations, just setup monitoring for your app like espego or new relic and see what is being hit most, you'll know what to do.
Error Establishing a Database Connection would be caused by
Have you reviewed and ensured the above is not the case ?
Thanks, I'll have to look into my own use case.
@leapswitch Database server becomes inaccessible whenever there is a spike of people visiting in a short time. I have to reboot the server. Doesn't happen often, do you know what kindof db does imdb use, mine is similar with details about local movie, episodes, actors, directors an so on with each its own taxonomy and each actor, director having its own bio pages, movie listings, lots of queries you can say.
I have PMed you some additional questions. We handle 100,000 concurrent users on our Wordpress clusters regularly. Here is something we handled last week >
If your database fits in RAM, there is a little benefit of adding more RAM. You're better off with adding CPU cores if that turns to be a limitation.
However, with WP websites you should just use caching so your requests won't even hit the database.
Optimize your code.
That's a pretty big jump.
True, but that's a big if. How many people's DBs fit in memory? I suppose it might for a small WP site it might. And your statement is not strictly true because the DB uses additional memory for sorts, etc.
Probably not his code if he's running WP.
Have you run mysqltuner.pl? That's both a script and a URL.
I have not. I'll look up how to use it. Does it run on the background to catch queries?
CPU + MySQL Table Indexes.
I had a problem like you with a Wordpress site having lot of post and only doing indexes on some tables solved my problem, i was wasting a lot of $$$ paying for servers and now i use only a CPX 4gb hetzner.
This is my server before doing it, i was using redis to cache everything but if i run a purge everything goes down for like 1 hour with 99% cpu usage x_x
Always check for /wp-admin/admin-ajax.php calls (in browser developer tools). Some plugins will try to store stats or something not needed with every page visit, overloading the server.
No, it's an instance tuner - it tunes your configuration.
I've been having issues all year with high traffic crashing my site. I have CPU: 2xXeon E5-2620 v3,
RAM: 32 GB, 250GB SSD dedicated server which I upgraded to about 2 months ago.
How much traffic?
Text/image pages, video, applications/services...?
Custom made, "click-to-install" script (as WordPress)...?