I can’t find good documentation on this signal except this:
Tor does not have a method for cycling your IP address. This is on purpose, and done for a couple reasons. The first is that this capability is usually requested for not-so-nice reasons such as ban evasion or SEO. Second, repeated circuit creation puts a very high load on the Tor network, so please don’t!
And this:
NEWNYM — Switch to clean circuits, so new application requests
don’t share any circuits with old ones. Also clears
the client-side DNS cache. (Tor MAY rate-limit its
response to this signal.)
I did some testing and found out that if everything works fine Tor will use a circuit for up to 10 minutes, and sometimes less when there is problem on the circuit or if it gets too slow I don’t really know. But I need to manually switch to a new circuit when a request times out because tor will not react fast enough for my use case.
I know I can post “SIGNAL NEWNYMrn” and it will work but after some delay, and I don’t want to add artificial delay to make sure the circuit has been effectively switched by the time I make the next request, I would like instead to have some sort of confirmation that it worked.
I built a log parser that is able to resolve circuits to IPs, but it doesn’t solve the second problem that Tor will rate limit this SIGNAL but doesn’t seem to be giving any information about that. They don’t allow that for obvious reasons but it doesn’t change the fact that it’s not very convenient to work with, because sometimes a circuit is becoming too slow and Tor will not changes and I just can’t keep using a circuit that takes up to 30s to fetch a small page.
I read a lot of different things, some people say it’s safe to use this signal every 10sec, some people say 10min… I don’t even know what happens if you use it too much, you don’t seem to ever get something else than a 250 OK response anyawys, so I assume you get limited off the scene.
user25485418 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.