Slow Database Connection from Azure Web Application

后端 未结 3 1214
被撕碎了的回忆
被撕碎了的回忆 2021-01-18 07:40

I have developed a Web Application a standard web application to allow users to display and update a set of data from an SQL database.

The Web Application uses a An

3条回答
  •  不思量自难忘°
    2021-01-18 07:55

    15 minutes is too short for your app to be recycled (as suggested by CSharpRocks). I dont think its the issue here.

    The delay is because a new Db connection is established upon first call after idle timeout. Typically if a connection is inactive for 4-10 minutes it will be closed. If a minimum pool size is specified, those connections will be kept alive even after idle timout expires.

    Try using this connection string (adjust min pool size as per your needs)

    
    

    Further details Why do we need to set Min pool size in ConnectionString

    List of SQL Connection Properties - documentation

提交回复
热议问题