Slow site, latency between cloud service and SQL Azure?

We have a web site that works pretty swiftly in a local development environment. But once deployed to Azure it slows down to a crawl (even for a single user). Some pages take 30-60 seconds to load. Even the simplest pages take between 5 and 10 seconds.

The app is rather data intensive, so the way I see it, there is a slow connection between the web node and SQL node. We currently use S2 instance, the S1 and S0 didn't work at all because of timeouts. When we execute queries directly against the database, they all return within milliseconds, so it is not a query performance issue. It seems that there is a big penalty on establishing the connection between the web node and SQL node.

I am not sure if this is a provisioning issue. At times it actually begins to work a bit faster. Not quite as fast in a local environment, but barely acceptable. But then it goes back to excruciatingly slow. Any advice is appreciated.

April 21st, 2015 10:19am

Hi Mimo,

Is this a 5-20second load time something that occurs every time you load the page or just on the first time you load it (cold start)?  The default website  settings might tear down your site after a period of inactivity and I'm wondering if that might be what's causing the performance issues.

Couple of things you might want to check :
- Increase the Instance count
- Check the Monitor Tab in Azure Website to see how much of CPU, DataIN and Data Out time is taken for a request to the site.

Recommend you to see this thread discussion on  Failed request tracing for troubleshooting on Slow requests  and a video  on   Troubleshooting Slow Requests with Failed Request Tracing that might help troubleshoot the slowness of website.

Regards,

Shirisha Paderu

Free Windows Admin Tool Kit Click here and download it now
April 21st, 2015 2:39pm

Thank you for the quick response.

The system is configured to auto-scale, but I am running an A2 instance with 2 cores and 3.5 GB of memory and I am the only user of the site. The CPU is at 2%. The database is only 116 MB and average DTU is only 0.34% (Max DTU is at 2.14%). 

This is why I am so concerned. The whole site should just fly. It looks very much like a huge latency in communication between the cloud service node and the SQL node. And worst of all, it changes with time. Sometimes it is kind of OK, and sometimes it is incomprehensibly slow. Same build, just different time of day. And there are no other users, just me.

April 22nd, 2015 3:51am

Hi,

How are you deploying the website ? Is it as a Web APP or a cloud service ? As per your response I understand that it is a cloud service.

If it a Web app , could you share the website url for further analyzing the issue.

If it is a cloud service, thread needs to be re-posted or moved to cloud services ( web and worker roles )

Regards,

Shirisha paderu 

Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2015 1:47pm

Hi,

Awaiting your response.

Regards,

Shirisha Paderu

April 23rd, 2015 8:06am

We have a web site that works pretty swiftly in a local development environment. But once deployed to Azure it slows down to a crawl (even for a single user). Some pages take 30-60 seconds to load. Even the simplest pages take between 5 and 10 seconds.

The app is rather data intensive, so the way I see it, there is a slow connection between the cloud service and the SQL node. We currently use S2 instance, the S1 and S0 didn't work at all because of timeouts. When we execute queries directly against the database, they all return within milliseconds, so it is not a query performance issue. It seems that there is a big penalty on establishing the connection between the web node and SQL node.

I am not sure if this is a provisioning issue. At times it actually begins to work a bit faster. Not quite as fast in a local environment, but barely acceptable. But then it goes back to excruciatingly slow. Any advice is appreciated.

Free Windows Admin Tool Kit Click here and download it now
April 24th, 2015 8:45am

Hello mimo72,

1. When you say that you have hosted your Web node and the SQL node, what service have you hosted your application on?
2. Are you hosting your application using Azure cloud Services or Azure Websites or Azure VMs?

Ensure that you have both your Web node and the SQL node placed in the same data centers to avoid latency due to regions. Also please help me understand your complete architecture on Azure to be able to understand your issue better.

Thanks,
Syed Irfan Hussain

April 24th, 2015 3:13pm

Yes, the app is hosted in Azure Cloud Services, the instance size is A2. The SQL instance is in the same region (West US). Right now it works OK, but last night at midnight it was impossibly slow. The dashboards showed about 5% CPU on both machines. Yet every page would take 10-40 seconds to load. 
Free Windows Admin Tool Kit Click here and download it now
April 24th, 2015 4:38pm

The site is dog slow again. The CPU on SQL server averaged 0.47%, the cloud service CPU - 27% (we have 3 users on the site). 

Here is a trace from a pretty simple page getting opened. Takes 5 seconds for the main request and the total time is 7 seconds. Just ridiculous. 



  • Edited by mimo72 Monday, April 27, 2015 8:41 AM
April 27th, 2015 8:39am

Hi,

Has this issue resolved already ? If so could you share the work-around so that it can help others who has similar issues.

Regards,

Shirisha Paderu


Free Windows Admin Tool Kit Click here and download it now
April 27th, 2015 10:13am

Hi,

Since the same issue reported again, merging both the threads.

Regards,

Shirisha Paderu

April 27th, 2015 10:28am

You asked me to post this question to a different forum, which I did. 

The problem was not resolved. How do you expect us to find a workaround? Our site is working fine in another environment, there is nothing wrong with our code. I can only troubleshoot it so far and the only explanation that makes sense to me right now is a latency between Azure cloud service and Azure SQL (despite them being in the same region). 

The Azure cloud has these issues and they were reported here more than once. I found some old threads going back at least a year. And judging by the lack of meaningful responses from Microsoft, the issue is not even being investigated. 

I begin to wonder if going with Windows Azure was the right move. When we had timeout issues between web and database nodes in Amazon cloud, their support was all over this issue and the problem was resolved quickly.

Free Windows Admin Tool Kit Click here and download it now
April 27th, 2015 7:57pm

Hi Momo72,

As this is an issue with cloud services, I am moving this thread to cloud services queue from azure web apps queue.

We apologize for any inconvenience that has caused , I have checked about the corresponding issue with the cloud services team and figured out that this needs a support ticket created as they would need access to  the secured information to find out the root cause for the performance issues.

Regards,

Shirisha Paderu

April 28th, 2015 5:34am

Hi,

  Deeply regret the issues you are facing with the application performance.
 
  I would suggest you go through the following stackoverflow thread where a similar issue has been answered.
  It has some interesting points and suggestions you may want to take into consideration.
  http://stackoverflow.com/questions/11574516/latency-between-azure-web-role-and-sql-azure-and-application-performance
 
  If this issue is affecting your Production, i highly recommend you create a Support Ticket and have a support professional analyse the performance issue from the backend.
 
  Please do let us know if you have any questions/concerns.
 
Regards,
Nithin Rathnakar

Free Windows Admin Tool Kit Click here and download it now
April 28th, 2015 6:42am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics