Re: pgbench: could not connect to server: Resource temporarily unavailable
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>,
Kevin McKibbin <kevinmckibbin123@gmail.com>,
pgsql-performance@lists.postgresql.org
Date: 2022-08-22T00:20:37Z
Lists: pgsql-performance
Thomas Munro <thomas.munro@gmail.com> writes: > Yeah retrying doesn't seem that nice. +1 for a bit of documentation, > which I guess belongs in the server tuning part where we talk about > sysctls, perhaps with a link somewhere near max_connections? More > recent Linux kernels bumped it to 4096 by default so I doubt it'll > come up much in the future, though. Hmm. It'll be awhile till the 128 default disappears entirely though, especially if assorted BSDen use that too. Probably worth the trouble to document. > Note that we also call listen() > with a backlog value capped to our own PG_SOMAXCONN which is 1000. I > doubt many people benchmark with higher numbers of connections but > it'd be nicer if it worked when you do... Actually it's 10000. Still, I wonder if we couldn't just remove that limit now that we've desupported a bunch of stone-age kernels. It's hard to believe any modern kernel can't defend itself against silly listen-queue requests. regards, tom lane
Commits
-
Doc: document possible need to raise kernel's somaxconn limit.
- ba94dfd4c4f6 16.0 landed
- 1a9c3ffd6428 10.23 landed
- 04056e9268be 11.18 landed
- 7951e0d7af98 12.13 landed
- 3ccdeff7bf19 13.9 landed
- 04f1013be084 14.6 landed
- 2c63b0930aee 15.0 landed
-
Doc: prefer sysctl to /proc/sys in docs and comments.
- 4ee6740167b6 16.0 landed
- a0d87e2a92ea 10.23 landed
- d0371f190a1f 11.18 landed
- 384199ec5059 12.13 landed
- 384497f34de5 13.9 landed
- eb0097c6f3ee 14.6 landed
- d53ff6a44b32 15.0 landed
-
Remove our artificial PG_SOMAXCONN limit on listen queue length.
- 0f47457f1129 16.0 landed
-
Instead of believing SOMAXCONN from the system header files (which is
- 153f40067630 7.2.1 cited