On Fri, Sep 30, 2016 at 02:48:38PM -0700, teor wrote:
Installed with apt-get and started simply as a demon aka service tor start Thank you for helping
Have you tried:
sudo su debian-tor --shell /bin/bash --command "ulimit -Sn" sudo su debian-tor --shell /bin/bash --command "ulimit -Hn"
I think these commands won't help you and might be a distraction -- if you're using the Tor deb, it will set your ulimits for you as part of the initscript: https://gitweb.torproject.org/debian/tor.git/tree/debian/tor.init#n40 So even if debian-tor's ulimits are set low (or heck, set high), the init script will still set them itself when you launch Tor.
That said, the number your Tor said makes me suspicious: "Failing because we have 4063 connections already."
Tor 0.2.7.x and 0.2.8.x keep 32 sockets in reserve: https://gitweb.torproject.org/tor.git/tree/src/common/compat.c?h=release-0.2...
So it really looks like your ulimit -n is set to 4096.
But 4096 isn't one of the numbers that the Debian init script picks!
Nice mystery you have here.
The thread you quoted earlier has some good hints: http://archives.seul.org/tor/relays/Feb-2016/msg00060.html
So do a "pidof tor" and it will tell you the processID number(s) of your Tor process(es), and then look in /proc/PID/limits where PID is the processID number.
I'm guessing you will see a line like
Max open files 65536 65536 files
But it will say 4096 instead?
And then my question for you would be "are you super sure that you're really starting the Tor service using the debian initscript?" You're starting it as root (or with sudo), yes?
--Roger