XF problem or simply insufficient server?



We're running XF 1.5.4 on a managed server with following hardware:

Intel® Core™ i7-3930K Hexa-Core incl. Hyper-Threading Technology
2 x 500 GB SATA 6 Gb/s SSD

Our forum is a fairly active one with nearly 2M messages and we're running Widget Framework plugin.

We have also made a custom plugin for subscriber validation which checks the user ID against a database and modifies their user groups accordingly. There's also a fairly lightweight ProcessWire based website associated with the forum which communicates with XF for user permissions.

The entire website and XF crash from time to time, just now two times within the same day. The error message we get is too many MySQL connections.

Both the website and the forums run a pretty heavy ad system but it's served from elsewhere. Nevertheless, it makes insane amount of http requests.

1. Do you think that the server is enough for a forum that size?
2. Any idea how to start debugging this?