Constant 'Database Connection Faulted' errors in Gateway log

v7.9.10

I have these errors that I only just noticed, as far back as I can go in the Gateway Log viewer. How can I diagnose these and find what’s causing them?

What DB? How many connections allowed?

Sql server
Connections were set to default 8
Time out was set to default 5000ms

Any specific queries that stand out in the slow query log?

There haven’t been any faults since changing the config for 3 hours now, so this is possibly resolved in terms of the crashing.

These are from longest queries just now. Some seem overly long… INSERT shouldn’t take 51s to execute

Seems to me you want to ensure indices on event_timestamp and action_target.

FWIW I do not feel that the duration given in my Longest Recent Query list are accurate and do not pay them much mind.

I often see entries that list a query duration as 30 minutes and started 20 minutes ago, things like that. If the variables were listed in Named queries rather than just logging the “?” it would make troubleshooting easier. But as-is I cannot believe some of the times I see recorded there. I cannot come close to replicating them via spot checks.