By default an HTTP connection that is sending or receiving data will timeout after five minutes. A connection that is idle and not sending or receiving data will timeout after one minute.
With a longer timeout more requests can be created and a larger open file limit will need to be configured. This will prevent the server from crashing when hitting the open file limit. After running the commands restart the server.
sudo sh -c 'echo "* hard nofile 100000" >> /etc/security/limits.conf' sudo sh -c 'echo "* soft nofile 100000" >> /etc/security/limits.conf' sudo sh -c 'echo "root hard nofile 100000" >> /etc/security/limits.conf' sudo sh -c 'echo "root soft nofile 100000" >> /etc/security/limits.conf'
To accommodate long requests such as large downloads or uploads the read and write timeout can be increased. Set the read and write timeout to the expected time that the longest request will take in seconds. The commands below will set a one hour timeout. The configuration is stored in the database and only needs to be run on one host in the cluster. Once set the web server on each of the nodes will automatically restart after a few seconds. This can be seen in the logs which will also show the timeout in the starting server event.
sudo pritunl-zero set router read_timeout 3600 sudo pritunl-zero set router write_timeout 3600
Updated about 4 years ago