Update docker-compose-common-components.yaml (#1207)#1255
Conversation
The default 100 max postgres connections isn't enough when managing more than 4 (?) game servers, triggering http 502 errors in UI (see : https://discord.com/channels/685692524442026020/685695097349734469/1470638305606373452). This fix increases the default to 300. This arbitrary number should suffice for a number of managed game servers up to 8, but still has to be evaluated in real conditions and edge cases (8+ servers). Signed-off-by: ElGuillermo <66552553+ElGuillermo@users.noreply.github.com>
Fragger
left a comment
There was a problem hiding this comment.
This seems sensible to me, something I've had to change a couple of times as well.
|
I'm running some tests on my CRCON, but as it only manages one game server, I can't tell much about it. Only thing I know is : people having the issue got it fixed using 300. Highest I got here was 40 (one game server). |
|
Quick info from a couple of setups. One with 4 full public servers and an event server is sitting at 112 connections. Another with 10 event servers is sitting at 147 connections but they are not being used at the moment. |
|
I guess these numbers should be tested using 8 or more full game servers, monitored by several CRCON users doing some heavy load things (searching logs, hammering the views, etc)... I'm testing an alternative : using pgbouncer to pool the postgre connections so they never hit any hardcoded ceiling. Works quite nicely since days. |
|
Just my two cents: Sure we could increase the limit (and as a quick fix this is probably good to go). However, I would really like to take a deeper look into the actual number of connections we need and, more importantly, why. That's what I can think of out of my head without looking too deeply into the code:
Together that would make about 24 connections (at minimum) for the above mentioned services. I assume that the number increases for some services that do stuff in parallel (each pool can have up to 5 conections, which would allow a total number of 100 connections per server, which will, hopefully, never ever reached, but as a max ceiling). Maybe we can take a deeper look into where the total number of 40 connections come from and tackle this issue (as wel)? :) |
|
Maybe we also can add this to the |
None of the connections in the connection pool should have transactions pending, shouldn't they? At least we're always either commiting a transaction or rolling it back. And the config you mentioned, from what I understand, applies to Postgres sessions with open transactions, only 🤔 Hence this will probably not change much. |
|
I opened two PRs:
|
|
I've created #1263 to move this discussion there and not have this PR thread overrun by it, sorry :] |
The default 100 max postgres connections isn't enough when managing more than 4 (?) game servers, triggering http 502 errors in UI (see : https://discord.com/channels/685692524442026020/685695097349734469/1470638305606373452).
This fix increases the default to 300. This arbitrary number should suffice for a number of managed game servers up to 8, but still has to be evaluated in real conditions and edge cases (8+ servers).