Problems with large number of posts (Wordpress)

July 23, 2013 3.9k views
I have a Wordpress Blog with ~ 6K posts. In the past when I used a shared hosting, my hosting company said that I used too many CPU. They asked me optimized and indexed my database. I bought a clound hosting (512 MB memory) since few days.but some time when I connect to my blog, there is a error 'Error establishing a database connection", and I must restart mySQL. Did someone have the same issue ? Please help. Thank you
5 Answers
Another option would be to optimize the my.cnf file so it uses less RAM, possibly limiting maximum concurrent connections and increasing some cache values.
MySQL is probably crashing due to running out of RAM.
I recommend upgrading your droplet to a larger one so you have enough RAM for everything.
@Kamal Nasser : Thank you. Do you think 1GB RAM is enough ?
It depends on the site's load really. Try scaling up to 1GB and load-testing the website (I personally recommend to see if that's enough. You should also optimize the my.cnf file as sb73542 mentioned.
Have another answer? Share your knowledge.