-
Notifications
You must be signed in to change notification settings - Fork 434
Prevent MySQL crashing
On our support forum and GitHub issue tracker, we are seeing some are facing MySQL crashing issue. This issue is commonly observed on Digital Ocean 512 plan. We are still working on preventing MySQL crash, below are some common points and measures observed.
For all VPS we recommend at least 1GB swap.
There is very nice article for crating swap. Link: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04
By default EasyEngine sets this values to 100, thanks to Kym for pointing, on low RAM VPS, for high traffic PHP5-FPM takes nearly all RAM, leaving no RAM to MySQL
Changing PHP5-FPM max connectios: Open www.conf file:
vim /etc/php5/fpm/www.conf
For less that 1GB RAM, set
pm.max_children = 10
For less that 2GB RAM, set
pm.max_children = 20
For less that 4GB RAM, set
pm.max_children = 50
After that you need to restart PHP5-FPM
php5-fpm -t && service php5-fpm restart
You can also follow this tutorial to tune PHP5-FPM
Tunning MySQL is always good practice. You can use following command to get MySQL tunning suggestions.
- MySQL Tunner
mysqltuner
- Tuning Primer
tuning-primer.sh
Adjust the MySQL values as per suggestions in my.cnf file
vim /etc/mysql/my.cnf
and restart MySQL
service mysql restart
If you still facing MySQL crashing issue, we are always ready to help you, for this you can use this thread: #244
EasyEngine (ee):
- Installation
- Stack Module
- Site Module
- Debug Module
- Secure Module
- Other commands
- Configurartion File
- EasyEngine Logs
Tutorials:
- SFTP Setup
- Remote MySQL
- Setup OpenDKIM
- HHVM with EE 2.x.x
- Prevent MySQL crashing
- Change WordPress Cache
- Migrate Website With EasyEngine
- EasyEngine with Hosting Providers
Misc:
- FAQ
- Roadmap
- [Support Forum] (http://community.rtcamp.com/c/easyengine/)
- EasyEngine Update
- EasyEngine Admin Tools
- EasyEngine Beta Testing
Chat:
- [EasyEngine Developer Chat] (https://gitter.im/rtCamp/easyengine)
Testing:
- [Travis-CI] (https://travis-ci.org/rtCamp/easyengine/)
Donations:
Recently Modified: