Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#5525 closed enhancement (worksforme)

Need graceful shutdown for relays

Reported by: tmpname0901 Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


On Windows, shutting down a To relay asks if you want to do a graceful shutdown, giving connected users time to find another relay. This should be possible in Linux too.

As it is, shutting down a Tor relay in Linux is an abrupt exit, anyone connected just has to wait for their connection to time out. On a busy node that is potentially thousand of people who know only that their web page partially loaded then hung.

I propose that a Close action be added to the existing Start and Stop (pardon my RedHat terminology) actions. This should delay a minute during which no new connections are accepted, then exit.

Child Tickets

Change History (8)

comment:1 Changed 9 years ago by nickm

Send Tor a SIGINT. Does that not do what you want?

comment:2 Changed 9 years ago by nickm

Milestone: Tor: 0.2.3.x-finalTor: unspecified

comment:3 Changed 9 years ago by nickm

Resolution: worksforme
Status: newclosed

Works for me. I started a dummy relay, sent it a SIGINT (with "killall -INT tor"), and got:

Mar 29 14:12:23.000 [notice] Interrupt: we have stopped accepting new connections, and will shut down in 30 seconds. Interrupt again to exit now.

Closing this ticket for now. Please comment or reopen if you meant something different than what you get with SIGINT.

comment:4 Changed 9 years ago by Sebastian

is this perhaps a vidalia bug?

comment:5 Changed 9 years ago by rransom

The Tor package for Debian uses SIGINT:

        if start-stop-daemon --stop --signal INT --quiet --pidfile $TORPID --exec $DAEMON; then

As I understand it, Vidalia sends the equivalent control-port command when a user tells it to stop Tor.

comment:6 Changed 9 years ago by arma

Perhaps the original user is wanting the rpm to have this feature too? Given the red hat reference.

comment:7 Changed 8 years ago by nickm

Keywords: tor-relay added

comment:8 Changed 8 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.