Thanks for your input everyone! I wanted to confirm that increasing the
somaxconn also fixed the issue for me.
Kevin
> $ cat /proc/sys/net/core/somaxconn
> 128
>
> by default, which is right about where the problem starts. After
>
> $ sudo sh -c 'echo 1000 >/proc/sys/net/core/somaxconn'
>
> *and restarting the PG server*, I can do a lot more threads without
> a problem. Evidently, the server's socket's listen queue length
> is fixed at creation and adjusting the kernel limit won't immediately
> change it.
>
>
>