From the course: Advanced SQL for Application Development

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Database not responding, timeouts, and exponential backoff

Database not responding, timeouts, and exponential backoff

From the course: Advanced SQL for Application Development

Start my 1-month free trial

Database not responding, timeouts, and exponential backoff

- Connection errors are a common problem with database applications. And one way to deal with them is a technique called exponential backoff. So let's take a look at what that is. Well, first of all, we want to understand that connection timeouts are due, because databases have limited resources, and those resources can become exhausted. So, for example, databases have connection pools. If all of the connections in the pool are in use, and there are no other connection available, then trying to make a connection and allocate one of those connection data structures, is going to fail. So you basically have to wait until one of those becomes available. Now, another possibility is that the database is so busy responding to other things, responding to queries, to database ingests, or some other operation, that it's not getting back, or handling a particular operation on a connection. And so, the client side, your application…

Contents