How long does it take for Tor to expire a circuit and pick a new one? Is there a way to control this expiration time?
The Tor FAQ also tries to answer this, but here's my attempt :
Circuits get created on start-up and whenever Tor thinks it might need more in the future or right now.
Once a circuits is actually used for the first time, it'll be marked dirty. Dirty circuits are used for new connections for 10 minutes by default (see
MaxCircuitDirtiness in the manual).
After those 10 minutes, a dirty circuit will stick around for as long as connections are still going over it. If you're just web browsing that might not be the case for long. However, if you are connected to IRC for instance it might be days.
So, to summarize: a circuit lives for some amount of time before you use it, then for 10 minutes for new connections, and then for however long it takes for these connections to finish.
An answer for modern Tor: Circuits are established per domain name and kept for two hours. They may change this again.