My server is crashing, I think its due to traffic but I am not sure how to tell
-
@johnhooks said:
What do you get if you type uptime? More curious about the 10 and 15 min load average.
I rebooted so It looks like it cleared the uptime info
-
-
-
-
@IRJ I have run Web Servers on DO before, you need to 2GB at the least unless you use something like Cloudways that has Nginx, Varnish, Memcached, etc.
-
Here is the nice graph Cloudways gives you.....
-
I upgraded to 2GB of RAM and we are seeing more traffic. No crashes so far.
-
I just had a look at it again, and you have 22 css files. That's insane, that's what's killing your web server. You have total of 156 requests on each visit. Look for a plugin that will aggregate css and js files.
-
Wow, that's a lot of CSS!
-
Here are some of cloudflare settings and stats
-
Minification is not aggregation. It is useful, and I'd always do minification, but aggregation gives you so much more.
-
Here's how to do it with w3 total cache plugin: https://wordpress.org/support/topic/plugin-w3-total-cache-css-and-js-combine-not-supported
-
Sorry to resurrect the dead, but this will help anyone who is experiencing the server database connection issue
7- SWAP File
A common issue that WordPress users have is the dreaded “error establishing a database connection” error that breaks a website. This is almost always due to your memory being completely used up – your database can’t create any new information because your RAM is jam-packed full. There are two reasons for this:You have a bajillion different versions of your posts (by default, WordPress saves all older revisions of pages and posts so you can recover previous copies).
You didn’t have enough memory for your usage to begin with.
If it’s the former, we suggest you download a plugin like Better Delete Revision – this will clean up all the old copies and free up some database memory. If it’s the latter, and in the case of setting up a new server on Digital Ocean, you need to create a swap file. It’s a bit more complicated, so luckily, Digital Ocean has their own handy guide on how to create permanent swap memory in Ubuntu. This creates a file that, yes, swaps in and out as memory gets full, allowing for reallocation of files to keep your memory clear.https://www.creativecali.com/how-to-set-up-wordpress-on-digital-ocean/