S
S
SabCoopers2014-11-30 17:47:41
WordPress
SabCoopers, 2014-11-30 17:47:41

Optimal bundle configs: DigitalOcean($5) + VestaCP + Wordpress?

A couple of months ago I decided to change shared hosting to VDS. The choice fell on DigitalOcean with a minimum 5 dollar tariff (because it is intended for a couple of sites with a small visit: 50-100 people / day).
In general, I like everything, but there was a problem with the frequent fall off of MySQL. (Error connecting to database).
Googling has shown that many people have a similar problem, when you can kill a site by simply holding the F5 key for a long time .. I'm not talking about failed online load tests, such as webpagetest.org loaddy.com, etc.
The main message from the forums is clear to me - unequivocally change the default settings to those optimized for my server configuration:
Debian 7.0 x32
512MB Ram
20GB SSD
CMS: Wordpress
As a result of dancing with configs in all sorts of different nginx.conf, etc. It seems that it was possible to save sites from being pressed F5, but all online tests still easily kill MySQL.
Considering the popularity of the server bundle, OS, control panel and site engine that I use, maybe someone here already has proven experience in properly configuring all this stuff? I would be grateful for good advice!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Игорь Воротнёв, 2014-12-01
@HeadOnFire

1. Веста хоть и самая легкая из CP, но все же жрет ресурсы, а на дроплете за $5 их и так очень мало. Ну а для одного сайта зачем вообще контрольная панель?! Удалите к чертям. Ну или попробуйте объяснить, зачем вам эта панель вообще нужна. Уверен, смысла в ней нет.
2. On a minimal droplet, everything should be done as thoughtfully and efficiently as possible. You definitely need a swap of 512MB or even 1GB. Nginx, preferably the latest mainline. PHP5-FPM with Opcache, Opcache needs to allocate 32MB. If there are more than 1 sites, you may have to increase it to 64Mb. Replace MySQL with MariaDB. Be sure to install Memcached, php5-memcached (with the letter "d" at the end), we give it 64-128MB of memory. In WordPress, install the Memcached Redux plugin (just carefully read how to install it - instead of activating the plugin, you need to copy the file to wp-content). This will enable persistent object cache at the WordPress level, most requests will stop reaching the database at all, and this is the bottleneck on the minimum droplet. In addition, if we are to do everything seriously, we install the FFPC (Fast Full Page Cache) plugin, it will allow you to cache the entire pages, and with a little tinkering with the configs, you can cache the pages in Memcached (that is, in memory), and give them from there directly to Nginx, without even raising the PHP process, and even more so without touching the database. The amount of memory for Memcached may need to be increased - it all depends on the size of the site. But with this approach, you will get very high response speed from your small server, and it will be able to withstand very heavy loads. With a website fully cached in memory and served by Nginx directly from Memcached, as well as with optimized code and files (minification and concatenation of scripts and styles, gzip, optimized images, etc., minimizing the number of requests, etc.) this A droplet for $5 will be able to serve 50,000 views per day. And this is already 1,500,000 per month. Even peak 1-2-3 thousand requests (which will be extremely rare, if at all) in a short period of time ("habraeffect") will barely noticeably pass - even if swap starts to be used, it is fast on SSD drives. As a result, some customers will experience small delays, no more. But this is about a thousand visitors to the site at the same time, no less. By the time the audience of the site has grown to this level, I'm sure you will have already switched to at least a $10 droplet. And there are more resources, with a similar approach, this droplet will withstand much more. But this is about a thousand visitors to the site at the same time, no less. By the time the audience of the site has grown to this level, I'm sure you will have already switched to at least a $10 droplet. And there are more resources, with a similar approach, this droplet will withstand much more. But this is about a thousand visitors to the site at the same time, no less. By the time the audience of the site has grown to this level, I'm sure you will have already switched to at least a $10 droplet. And there are more resources, with a similar approach, this droplet will withstand much more.

F
FitEmpire, 2014-12-01
@FitEmpire

At the most such server, there was a similar problem.
https://forum.vestacp.com/viewtopic.php?f=32&t=5070
MySQL got into both upstart and init.d.
Do a chmod -x /etc/init.d/mysql to start MySQL from upstart only.

P
Pavel, 2014-12-06
@Ingg

Read poke

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question