---
title: "The Azure Router Timeout"
description: "Symptoms"
url: "https://docs.ravendb.net/6.2/users-issues/azure-router-timeout"
version: "6.2"
---

# The Azure Router Timeout

> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

\#The Azure Router Timeout

## Symptoms

- An exception is thrown in RavenDB Client when accessing RavenDB Server. The exception was because of a socket timeout or general connection failure.
- Problem happens mainly on Azure hosted VMs

## Cause

Azure's Load Balancer closes connections that are idle for more than 60 seconds.

## Resolution

We have to make sure that there are no connections that are idle for more than 60 seconds.

There are two possible ways to do that:

- Make sure that RavenDB is accessed at least once a minute (consider having a keep-alive message)
- Change the service point manager's [MaxIdleTime](https://docs.microsoft.com/en-us/dotnet/api/system.net.servicepointmanager.maxservicepointidletime?view=net-5.0);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5);k(DevLang-csharp)\&rd=true) value in your client application

> **Note**
>
> RavenDB is using heartbeats in 3-10 second intervals on all its internal communication channels so they will be kept open.

## Further Reading

- [Azure SQL Server Connection Management](https://social.technet.microsoft.com/wiki/contents/articles/1541.windows-azure-sql-database-connection-management.aspx)
