Increase TCP Connections for Plex on Ubuntu

Increase the number of simultaneous connections will help with importing Metadata at a faster rate and resolve issues where plex will run out of connections and Queue them in Memory. This could lead to a lockup of the system.

Check the TPC Connection Limit

The default max is 128 open sockets and can be seen by

sudo sysctl -a | grep somaxconn

Now that we see the limit is so low. We can increase the limit.

sudo nano /etc/sysctl.conf

Add the code below to the bottom to increase the limit.

net.core.somaxconn=65535

Use Ctrl + X to save and now reload the sysctl

 sudo sysctl --system 

Now the new limit is active and can be verified using the first step

sudo sysctl -a | grep somaxconn

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.