-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Labels
needs-repropending reproductionpending reproduction
Description
Problem
When there are lots of requests coming to a slow function (due to unoptimized queries), postgREST consumes a lot of CPU (more than pg itself):
This is likely due to db-pool-acquisition-timeout, for this case it was 10 (the default).
This needs more digging, but maybe there's a lot of queued/spawned threads that contribute to CPU usage.
If so, reducing the pool acquisition timeout should also be a solution.
Solution
WIP. Could there be a way to limit the amount of queued/spawned threads to prevent high CPU usage? So if db-pool-acquisition-timeout=10 and there are many requests waiting then reject right away instead of queuing up?
Metadata
Metadata
Assignees
Labels
needs-repropending reproductionpending reproduction