<div dir="ltr">Hi<div><br></div><div>I think tor already has 32k open files limit, hence the error. Just to make sure, try this:</div><div><br></div><div>cat /proc/`cat /run/tor/tor.pid`/limits<br></div><div><br></div><div>Notice the line with "Max open files"</div><div><br></div><div>Depending on how tor is started, you might need to change the config:</div><div>with systemd</div><div>  /lib/systemd/system/tor@default.service:</div><div>      LimitNOFILE=xxxxx     <= change this</div><div>with init</div><div>  /etc/security/limits.conf:</div><div>      *                soft    nofile          8192</div><div>      *                hard    nofile          32768</div><div>      that one can be change /user (username), /group, ... or for all users (*)</div><div><br></div><div>Bye</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 7 Dec 2017 at 16:25 Tyler Johnson <<a href="mailto:tylrcjhnsn@gmail.com">tylrcjhnsn@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">I believe this warning describes a lack of available file descriptors, limiting the amount of connections your tor relay is able to make.<div dir="auto"><br></div><div dir="auto">ulimit -n is exactly the command you want to use to raise that limit from your current 1024. </div><div dir="auto"><br></div><div dir="auto">What exactly that number should be, I couldn't say, but you could start at 10000 and raise / lower based on your needs and resources.</div><div dir="auto"><br></div><div dir="auto">Raising a similar limit on OpenBSD from the default to 20000 helped eliminate the error for me.</div><div dir="auto"><br></div><div dir="auto"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Dec 7, 2017 7:28 AM, "Logforme" <<a href="mailto:m7527@abc.se" target="_blank">m7527@abc.se</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I run the non-exit relay Logforme (855BC2DABE24C861CD887DB9B2E950424B49FC34).<br>
<br>
Today I saw a new warning in my tor log file:<br>
Dec 07 09:48:12.000 [warn] Failing because we have 32735 connections already. Please read doc/TUNING for guidance.<br>
<br>
The relay runs on an old Debian Wheezy machine. Me being a Linux noob I tried to read the doc/TUNING document (<a href="https://gitweb.torproject.org/tor.git/tree/doc/TUNING" rel="noreferrer" target="_blank">https://gitweb.torproject.org/tor.git/tree/doc/TUNING</a>) but the only information I deemed suitable for me was "Use ulimit -n", which I ran and it reported "1024". I guess that's not of interest for this warning.<br>
<br>
Over the years I have added some stuff to my sysctl.conf file that I have picked up. Don't remember from where:<br>
# Tor<br>
net.core.rmem_max = 33554432<br>
net.core.wmem_max = 33554432<br>
net.ipv4.tcp_rmem = 4096 87380 33554432<br>
net.ipv4.tcp_wmem = 4096 65536 33554432<br>
net.core.rmem_default = 524287<br>
net.core.wmem_default = 524287<br>
net.core.optmem_max = 524287<br>
net.core.netdev_max_backlog = 300000<br>
net.ipv4.tcp_mem = 33554432 33554432 33554432<br>
net.ipv4.tcp_max_orphans = 300000<br>
net.ipv4.tcp_max_syn_backlog = 300000<br>
net.ipv4.tcp_fin_timeout = 4<br>
vm.min_free_kbytes = 65536<br>
net.ipv4.tcp_keepalive_time = 60<br>
net.ipv4.tcp_keepalive_intvl = 10<br>
net.ipv4.tcp_keepalive_probes = 3<br>
net.ipv4.ip_local_port_range = 1025 65530<br>
net.core.somaxconn = 30720<br>
net.ipv4.tcp_max_tw_buckets = 2000000<br>
net.ipv4.tcp_timestamps = 0<br>
net.ipv4.tcp_challenge_ack_limit = 999999999<br>
<br>
None of the values seem to match the 32735 mentioned in the warning so I'm at a loss for what I am supposed to change.<br>
Anyone knowledgeable of these things that can give me some pointers?<br>
<br>
<br>
_______________________________________________<br>
tor-relays mailing list<br>
<a href="mailto:tor-relays@lists.torproject.org" target="_blank">tor-relays@lists.torproject.org</a><br>
<a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays" rel="noreferrer" target="_blank">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays</a><br>
</blockquote></div></div>
_______________________________________________<br>
tor-relays mailing list<br>
<a href="mailto:tor-relays@lists.torproject.org" target="_blank">tor-relays@lists.torproject.org</a><br>
<a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays" rel="noreferrer" target="_blank">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays</a><br>
</blockquote></div>