400+ active users generate a big load - very big if they are sitting for an on-line test (Quiz) all together. Luckily you've separate web and database servers, making it easier to understand the 'top' outputs.
- web server: Definitely over loaded. Load average of 47(!), with 50 processes running - almost all nginx - each consuming ~4.5% CPU and ~4% RAM. That machine needs more resources.
-- Xeon(R) CPU E5-2670 0 @ 2.60GHz is not a bad CPU : 8 core, 16 thread? Did you confirm with /proc/cpuinfo?
-- 2 GB RAM, are you sure? That would be a disappointment. To match the CPU, you need to be in the range of 16 GB. The low RAM could very well be your problem. (I am still puzzled that your server is not swapping.)
-- You didn't say anything about the disk system, neither the system software, PHP specially, and the caching mechanisms in use.
- DB server
Seems to be running much smoother - load average of 26. Again the same CPU but only 1 GB RAM. Way too low. For a database server a good disk system and lot of RAM for database caching are important.
You have a demanding load, need good resources to start.