7

We use Stem's launch_tor_with_config with the following config and then close all circuits opened by it (with close_circuit).

  • MaxCircuitDirtiness and NewCircuitPeriod: tens of hours
  • MaxClientCircuitsPending: 1

Then we build just one circuit by calling new_circuit (Stem) and set (set_conf) __DisablePredictedCircuits to 1 (since we cannot bootstrap with this setting).

After a while Tor starts building new circuits, which we don't want.

Most of the time we could find a sign of failure in the debug log just before the circuit creation, such as:

  • connection_ap_expire_beginning: "We tried for [10|15] seconds to connect to XX using exit XX Retrying on a new circuit"
  • connection_ap_process_end_not_open(): Address XX refused due to 'misc error'. Considering retrying.

How can we tell Tor to try really hard (longer timeouts, higher retry counts, ignore some connection failures etc.) before it opens a new circuit?

user709
  • 71
  • 1
  • 2

1 Answers1

3

Just looking through code on git I'm seeing:

int NewCircuitPeriod; /**< How long do we use 
                    a circuit before building... **/

Which makes me think that if "10s of hours" in seconds is easily overflowing an int. try around 30000 maybe?

Neil Neyman
  • 759
  • 2
  • 8
  • 16