Slit518
Adventurer
I voted 20. But that's really just a place holder. The actual answer is;
A) When it stops being interesting. At that point you need to have some way to wrap it up/escape.
Or
B) When the players come up with some creative enough way to escape.
I am sure the dungeon would have a definitive exit or exits.