We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3654
    • 3 Posts
    Our clients website has been sitting on it's apache shared hosting server for a number of months now.
    Just in the past 2 weeks it's twice exceeded the max number of connection to the database.
    The site is receiving about 22k page views a month.
    Based on the error logs given by the hosting company, it appears that there are database connections that are still opened and were never closed.
    My assumption would be that Modx would close all database connection when retrieving data.

    Is there a reason why the website is not closing the connection to the point that the server is shutting connection completely?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      This happens when a server is overloaded on a shared hosting site. What hosting company are you using?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 1343 ☆ A M B ☆
        • 2,213 Posts
        You shouldn't be exceeding the connection count unless as sottwell noted the server is overloaded, or something is misconfigured. Connections to the database only last for a split second.

        I'll second the question, who is your hosting company? What custom snippets/plugins do you have on the site, perhaps one of them just needs a little adjusting.

        Granted, If your traffic is increasing it may be time to consider shifting to a VPS server.
          Patrick | Server Wrangler
          About Me: Website | Tweets |  MODX Hosting