Forum Discussion
Intermittent connectivity issues connecting to lakehouse SQL Analytics endpoint
- Anonymous2 years ago
Hi gmangiante,
According to your description, it seems like more related azure app service release resource which connections used to optimize/reduce the source usage.
Have you tried to add some simply query to request with low frequency as heartbeat to keep connections alive?Regards,
Xiaoxin Sheng
Just a quick follow-up: I did go ahead and try authenticating via stored ClientSecretCredential from the App Service, and it hasn't improved reliability. I continue to have a completely stable experience developing locally, and a fairly unpredictable experience from the App Service. Additionally, there does seem to be a "waking up" aspect to the errors I'm seeing from the App Service - once it succeeds, typically after 3 or 4 tries, it will remain stable for a while, but if I leave it idle for too long, it goes back to the 0x2746 errors.
Hi gmangiante,
According to your description, it seems like more related azure app service release resource which connections used to optimize/reduce the source usage.
Have you tried to add some simply query to request with low frequency as heartbeat to keep connections alive?
Regards,
Xiaoxin Sheng
- gmangiante2 years agoFrequent Visitor
Just to put a pin in this in case anyone else runs across it - I can confirm that the behavior I was seeing has disappeared by implementing a "heartbeat" query to the lakehouse a couple of times a minute. In my case, I chose to do it by starting a looped task via asyncio during my FastAPI lifespan startup. Also, keeping the heartbeat alive means that I don't have to worry about waiting for resources to spin up to answer queries if the lakehouse hasn't been touched in a while! A great solution.
- gmangiante2 years agoFrequent Visitor
Hi, Xiaoxin - thanks so much for the timely reply, and I think it's a great suggestion. Will give that a shot!
- Anonymous2 years agoNot applicable
Hi gmangiante,
I think I find the document that mentions this at the azure app service performance Q&A:
Application performance FAQs - Azure | Microsoft Learn
Azure Load Balancer has a default idle timeout setting of four minutes. This setting is generally a reasonable response time limit for a web request. so, App Service returns a timeout to the client if your application does not return a response within approximately 240 seconds (230 seconds on Windows app, 240 seconds on Linux app). If your web app requires background processing, we recommend using Azure WebJobs. The Azure web app can call WebJobs and be notified when background processing is finished. You can choose from multiple methods for using WebJobs, including queues and triggers.
For this scenario, you can add the processing in code, use background processing in webJob or manually modify the timeout properties.
Regards,
Xiaoxin Sheng