There is no easy fix.
But, you can start by logging slow queries and then use a tool to analyze it. Find out what queries are bringing the server down.
Use tools like mysql tuner to analyze mysql and tweak the config. You should only make one change at a time. One per day is a good rule of thumb.
There is much more you can do, such as caching the results, optimize the queries, remove unnecessary joins, etc.
These are just a few things I can think of off the top of my head.
|