Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Examine dmesg and log files for signs of mysql crashing. Very likely it’s killed for out of memory errors.
Post memory profile like the output of free(1).
Ensure you have swap enabled.
In my experience at least 2Gb RAM is required for running PHP-FPM in production along with mysql/redis.
If the php process is taking up way too much RAM, it’s possible that your code has a memory leak of some sorts. I would suggest using https://github.com/barryvdh/laravel-debugbar to profile your application’s memory usage and see what’s taking up so much RAM.
As another option you could run mysql on a second droplet and enable local networking for both of them. That way when your php application hogs too much memory the OOM killer will only murder your webserver workers and not your mysql database. (You’ll have to connect to your database via tcp instead of unix sockets though).
As a plus you can also increase the size of each droplet as each sides needs grow, rather than hoping they don’t step on each others’ toes, there’s also less risk of mysql losing data when it’s randomly killed.