Ask a questionAsk a question
 

QuestionUndeterministic Browser Hangs when debugging

  • Sunday, November 01, 2009 1:51 PMAnton Staykov Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,
    I have a wired experience using VSTS 2008 SP1 (elevated) with Azure Tools July CTP (using Windows 2k8 R2 as Dev machine).
    Almost every time I hit F5 to debug my project I got a browser hang (and crash). Browser message is just "Connecting..." and a white screen. Sometimes is responsive and I open new tab, close the "waiting" one, paste the address in the new tab - and it starts and everything works fine. But sometimes it just hangs and IE becomes "Not Responding". Then I hit the "STOP" from Debug toolbar in VS and it kills the browser.
    In my solution I have one web role, one worker role, one silverlight application (ria enabled and liked to the web role), and a couple of class libraries. My project also uses SQL Azure, but when debugging and running locally I am connected to local instance of SQL Server 2008 standard.
    I noticed that sometime when I explicitly Rebuild the Silverlight project AND the WebRole project prior to hitting F5, everything starts just fine. But not always. I also noticed that most of the times the service deoplyment is not yet ready, when the browser is launched. So I wait to see "Event=Information,Level=Info,ThreadId=4720,=Returned from GetHealthStatus() with Healthy" for the WebRole, prior to trying to refresh the page.
    If the browser is "Not Responding" I can't open the Development Fabric UI either. Just after I kill the browser I have control over the DevFabric.
    Also sometimes I am able to open development fabric before the browser hangs, but it just hangs, even after I see that service is depoloyed correctly.
    I guess it has something to do with lauching the browser too early, before the service is fully deployed and functioning. So the combination of browser issuing request to the fabric, before it is ready, along with not yet deployed service is causing this behavior.

    Is there anybody else who is experiencing same issues? Did you solve it somehow ?

    While building and deploying I see different messages are rotated in the Status bar of VS. One of them is "waiting for service deployment" and after that I think comes something like "lauchning browser". Maybe the DevFabric is returning "service deployed" too early, before it recieves "Healthy" status from roles. These are my guesses.

All Replies

  • Sunday, November 01, 2009 4:32 PMmh415 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I get browser hangs about once every 30 debug sessions.  To proceed, I have to kill IE from the Task Manager, and then shutdown the Dev Fabric if I want to continue using the same port it previously ran on.  Sorry I don't have a solution for you, but I thought it might be helpful to have at least one more datapoint.  Environment: Win7 AMD64, VS 2008 Professional, 1 MVC.NET web role, 1 worker role, tables, and queues.

    I assume that if you created a new empty project that IE would launch correctly every time.



  • Sunday, November 01, 2009 6:40 PMAnton Staykov Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Well, at least I see it's only me who get these hangs :)
  • Tuesday, November 03, 2009 5:44 AMYi-Lun LuoMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello, what do you mean exactly by browser hang? Do you mean the browse is still responsive, but the web page is never rendered (server hangs), or do you mean the browser itself becomes unresponsive (client hangs)? If it's the latter, I would check the Silverlight application, because Development Fabric will not cause a client hang, while Silverlight can.

    If it is a server hang, then the problem may be in the Azure environment, or in your server side code. To begin, does it work fine if you host the application in IIS instead of Development Fabric?
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
  • Tuesday, November 03, 2009 8:51 AMAnton Staykov Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,
    By browser hangs I mean completly browser "Not Responding" state.
    I have a membership provider and using forms authentication, so the first page is always the login page. Even before the login, it is the default.aspx, which does not host Silverlight, but plain html with couple of links. I do not have issues with the Silverlight itself, if I am able to reach the silverlight page :)

    Sometimes the hangs are jsut not responce from server, but I see the address in address bar, which I am able to copy & paste in new tab - this time everything works OK.

    Is there a guide how to host a CloudService app in IIS, or you mean to just host the WebApplication in IIS? Because if I just run the WebApp project instead of CloudApp project, then it runs fine, even with Development Server not IIS.

    Thanks for your reply.
  • Tuesday, November 03, 2009 8:59 AMYi-Lun LuoMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Yes, I mean you can try to deploy the web application to local IIS, to make sure it works there. Also, if you run your application without debug, does it work fine (you can manually remove the deployment in Fabric UI when you no longer need it)?
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
  • Tuesday, November 03, 2009 11:53 AMAnton Staykov Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello again,
    Actually I am almost always removing development fabric before testing any new changes.
    Starting without debugging I have better "success" ration, but it also causes hangs from time to time. As I stated in the initial question title - it is totally undeterministic behavior. And as I also explained - the most reliable way I found so far is to explicitly ReBuild Silverlight and Web Role projects prior to hitting F5 and debugging.
  • Tuesday, November 10, 2009 12:30 AMJ Larry Aultman Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have a similar issue with VS 2008 and the development fabric.  My VS becomes what seems unresponsive.  The main screen is in accessable while the properties, solution explorer and other windows are all active.  I can open code pages using the solution explorer but cannot get any response from the main screen (menus, code areas, etc.).  The only thing I can do is use the Task Manager to kill the VS process.

    This happens ONLY in the develomemt fabric.  If the fabric is not running when I launch an application it launches as expected however the application IE will never show and the VS instance will hang.  If the fabric is running then the IE will launch if and only if the application has no errors. If there are errors then it will hang VS.

    This is totally aggrivating.  I have to kill VS and start over every few minutes.

    Larry
  • Tuesday, November 10, 2009 5:48 AMJim NakashimaMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    We have an upcoming release of the tools (+sdk) where we've overhauled the communication mechanism between VS and the devfabric.

    I can't disclose when the release is coming (I know that would be the next question) but will follow up on this thread after we release it.  If it doesn't solve your problems, I'll work closely with you all to figure out what problems remain.

    Thank you for your patience.
    Jim
    Jim Nakashima, Microsoft. (This post is provided "as-is")
  • Tuesday, November 24, 2009 1:28 AMJim NakashimaMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Can you please let me know if you continue to see this issue with the November 2009 release of the Windows Azure Tools + SDK? 

    We made a number of changes in the communication mechanism between Visual Studio and the DevFabric and we believe we've solved this problem but want to dig in and investigate if our customers are continuing to see this problem.

    Thanks.
    Jim Nakashima, Microsoft. (This post is provided "as-is")
  • Thursday, November 26, 2009 8:58 PMAnton Staykov Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,
    I still experience same issue - as described in my posts here.
    However I noticed that I am experiencing same issue while developing normal WebSites (not even Web Applications). So may be it is some general issue. My Environment is: Windows Server 2008 R2 (x64), VSTS 2008 SP1, Windows Azure Tools Nov'2009, .NET Services Tools NOV'2009, RIA TOOLS Jul'2009, SL 3 Tools for VS 2008 SP1. When I hit F5 - I almost everytime end up with Browser not responding. When I open the DevFabric UI I see the service is deployed correctly and all Roles are "healthy".
  • Monday, November 30, 2009 3:36 AMJ Larry Aultman Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Jim,
    I continue to have the issue in the Nov 09 Azure CPT.  New information for you.
    I have tested in VS 2008 and VS 2010 with identical results.
    Running the create cloud services wizard I started an new project with web role, wcf web role, and woker role.  I made no changes to the generated code and did a quick build which succeeded with no errors.

    When I execute the Azure project it creates two broswer windows. The one for the web role succeedes and loads as expected. The wcf role throws: Server Error 403  Access denied (directory browsing is not allowed).

    Here is what I was doing and what hangs.

    I normally kill the web app by just clicking the X in the top right to close the browser.  That seems to normally kill the debugging session.  It is not working that way in the current CTP for Azure.  Some process is not being released and VS is stuck/hung in debug with all its buttons in the main screen not accessible.  That does not mean "disable" it means "not able to be clicked."  Anywhere you click on the main screen you get the Windows error beep.  Also the tray icon is also non responsive.  However the VS solution explorer, properties, and other windows are active.  I can open code pages while it is hung.

    However running the same application and instead of closing the debug session with the X on the browser itself, I use the VS "stop debug" button on the toolbar then everthing works normally.

    My guess is that because it launches multiple browsers that closing one of them causes a cascade closing of the others but VS doesn't get the message that they have closed and is waiting on a message that will never come.

    Larry