joe_g Posted October 19, 2021 Share Posted October 19, 2021 Hi there, On one site (on tsohost.com) i get this error message that I'm using too many db connections. The site will hang for half a minute then work again. I wonder, is max 30 low, or normal? It's the first time in a decade I encounter this issue in PW. I'm doing some custom logging so i do new Page() and ->save() for some pages, could this mess with the db connection pooling? Do i need to explicitely close any connections?? I would imagine I don't need to do anything like that, or? many thanks J Link to comment Share on other sites More sharing options...
Rudy Posted October 19, 2021 Share Posted October 19, 2021 The max number is relative to the size and availability of your database server. It also depends on how you set up your front-end output. For a short term solution, the first thing you need to do is to cache your front-end output as much as possible (without compromising the freshness of content of course). You can either use template caching or ProCache. Since you are on a shared host, you are at the mercy of the pool of sites/apps that are on the same vm. If you have the budget or want to have more control over how resources are being allocated, you might want to consider running your site on your own VPS. DigitalOcean, Linode, AWS to name a few. There are server provisioning management services out there that can help you with the set up. RunCloud, ServerPilot or Forge are some good examples. 2 Link to comment Share on other sites More sharing options...
joe_g Posted October 20, 2021 Author Share Posted October 20, 2021 Thanks! Not using a lot of cache on this particular site, maybe 30 is normal and i just need to simply cache more... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now