by tbarbugli · 13y ago · 0 comments
Even with pages cached in Memcache, Drupal would open a DB connection by default (it's possible to override this using page_cache_without_database, but not everyone is going to do that).
Using something like Varnish as the primary page caching mechanism would work around this, albeit with some trade-offs.
Generally though, the fault with issues like this is often that the MySQL connection limit is set lower than it needs to be. Often, this is set at a level far below that which would actually cause the DB server to become overloaded, and it just starts rejecting further connections even if capacity exists to handle more.
EDIT: typos
Page runs on Drupal > Drupal uses database > Database connections were exhausted. I was suggesting caching up front to bypass calls to the database (not specifying a particular piece of caching software).
At the time I was looking at the page through a 3rd party cache. I didn't realise the page had inline comments, those would of course complicate the problem.