||ADO.NET Connection Pooling Explained|
Response to: Recursive
Yes the recursive idea is bad. Especially as written in the sample code.
First the num_tries counter never gets incremented as the recursion progresses.
Secondly, suppose max_tries is 100. And it takes 50 tries to find a working connection. Once this happens, the ExecuteDataReader will recursively re-execute 50 times as it ripples up the stack.