Scroll to top

Dec 13, 2024

The home on the web of Colin Walker.
Find out more on /about, say /EHLO, or tune in to the daily RSS feed.

Dec 13, 2024#p2

While it hasn't really impacted me, I've had issues with "too many connections" errors being logged by the site.

I've tried a few different solutions including persistent connections and checking for existing ones but still get some errors.

Two separate classes (DBR and DBW) handle queries for reading and writing from/to the database so it was imperative that any solution didn't change this, otherwise every page that needed a connection would have to be changed.

Previous asks of ChatGPT and Claude have resulted in proposed solutions that would effectively need an entire rewrite — not happening. This time I asked Gemini and was a bit more specific. It returned a fairly simple solution for pooled connections that supported the existing ways I query the database and didn't require too much change.

Things seem to be going okay thus far so I'll keep an eye on it. Next up will be looking at why it (very) occasionally creates an empty draft when I log in.