Slow configuration changes in WebRoles and WorkerRoles - RoleEnvironment.Changing

We've been suffering for quite some time with what I think is really slow times to apply simple appsetting changes to our deployments. Let me describe our two deployments:
Deployment 1: 1 WebRole, generally two small instances. Changing an appsetting usually takes a tad under 2 minutes to complete.
Deployment 2: 1 WebRole and 3 WorkerRoles, generally two small instances for each role. Changing an appsetting usually takes just about 5 minutes to complete.
This just seems way too long. It's an appsetting after all. So today I started digging in to the RoleEnvironment.Changing event, thinking maybe my roles were being restarted for a simple appsetting change. On each of these roles I implemented a changing
event handler that looks exactly like this:
public void RoleChanging(object sender, RoleEnvironmentChangingEventArgs e)
if (e.Changes.Any(change => change is RoleEnvironmentTopologyChange))
e.Cancel = true;  // restart instance on topology change
else
e.Cancel = false;  // avoid restarting the instance for a setting change
Then in the OnStart() method I hook it up like so:
RoleEnvironment.Changing += RoleChanging;
After deploying old code without this to Prod slot and this new code to Staging slot and making an appsetting change on both there is essentially no difference in timing. So a few questions:
1) Have I misinterpreted how the Changing event works?
2) Is it normal to expect it to take 5 minutes for an appsetting change when I have 4 roles each with two instances? Am I fighting a battle that cannot be won?
Any insight is much appreciated...

Hi,
The code looks fine. To check whether the role still gets shutdown or not, you can handle the role's Stopping event, and write some messages to, say, table storage. Then if you see the message in table storage, it means the role has been restarted. Also please
try to write some messages in the Changing event to check whether your event handler is called.
Best Regards,
Ming Xu
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How can i change the scroll direction of the trackpad? Someone hooked a mouse up to it and it changed the settings and I cant change it back.

    How can i change the scroll direction of the trackpad? Someone hooked a mouse up to it and it changed the settings and I cant change it back.

    >System Preferences>Hardware>Mouse>Point & Click>Scroll Direction.

  • Hi, My ipad has been stolen and I set up the erase data function in i cloud "find my device". I then changed my mind and wanted to change this to locate my device

    Hi, My ipad has been stolen and I set up the erase data function in i cloud "find my device". I then changed my mind and wanted to change this to locate my device rather. When I deleted the "erase" option it removed my ipad from the find my device list. Can I restore it back onto the list?

    Once a wipe is sent, it cannot be stopped. You will not be able to track your iPad after that.

  • Changing internet providers and need to change my address. Would like to use 3 apple addresses. How do I do this

    I'm unfamiliear with the proper terms, but I need to change internet providers and don't want to use the new provider's address. I understand that I can use an Apple address for 3 addresses. Help!

    Heard it in conversations. I'm tryinng to set up e-mail communications for my husband to his computer and 2 for myself (computer and phone) and also would like to use one  that's set aside for e-mail ordering, etc. so if my address is sold I won't get so much junk on my regular e-mail.

  • I had to change my password, and need to change my security questions, as they are wrong. Apple won't let me change the security questions unless I answer the old ones, which I cannot do. Suggestions please for how I can change my security questions.

    I had to change my password and did so succesfully, but cannot change my original security questios. To make new security questions, Apple wants me to answer my old security questions, which I cannot do to their satisfaction, as my answers do not match their answers on file. Is there a way to change my security questions without being able to answer my orignal questions first?

    Outlaw123456 wrote:
    Apple wants me to answer my old security questions, which I cannot do to their satisfaction, as my answers do not match their answers on file.
    Why not? If you're the owner then you should know your own question/answer combination as you created them.
    Outlaw123456 wrote:
    Is there a way to change my security questions without being able to answer my orignal questions first?
    Call Apple.

  • Language changed to català and impossible to changed back

    Hi,by mistake I changed my PlayBook to català and I cannot changed it back to english or spanish as I do not have the option of the country,I only haver option of language like català,svenska,polski!!!!!and i do not speak any organitza these language nord català!!!! Help!!!thanks

    If you are getting an error message when trying to change your country back then what does it say ? You've tried logging out and back into your account ?
    Changing country : Change the country of your iTunes Store, App Store, iBooks Store, and Mac App Store account.
    If you can't get it to change back then you could try contacting iTunes Support and see if they can do it (these are user-to-user forums) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • Changed Apple ID and can't change iCloud on devices.

    I changed my Apple ID and Password without first logging out of iCloud on my iPhone and iPad. iCloud is asking me to log in with the old ID and password which no longer exist. How do I get rid of the old icloud account and set up the new one on my iPhone and iPad since I deleted that ID??? Thank you for your help.

    To change the iCloud ID you have to go to Settings>iCloud, tap Delete Account, provide the password for the old ID when prompted to turn off Find My iPhone, then sign back in with the ID you wish to use.  If you don't know the password for your old ID, or if it isn't accepted, go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll.  When finished go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • My ipod is disabled because my kid changed the password and forgot she changed it to. what do i do?

    my ipod touch is disabled because my kid changed the password. she forgot what she changed it to and now it is disabled. how do i fix this problem

    Place the iPod in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen
    If recovery mode does not work try DFU mode.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings

  • HT4528 The icons on my iphone have all changed to large and I cannot change it back to normal view. Has anyone seen this happen?

    My phone's display has changed as if it were stretched like we can do with photo's except it affects the whole phone. It won't go back to a  normal display even after shutting it off and restarting. Has anyone seen this and  how did you resolve?

    Thank you...this did the trick. I had forgotten about that zoom feature. Now I will ALWAYS remeber it!
    Thank you,
    Deb

  • Why did in the right-click menu the "open in a new tab" and the "open in a new window" -buttons change places? And can you change it back?

    With the Firefox 4 RC, the "open in a new tab" and the "open in a new window" -buttons have changed places. It's quite annoying because I normally do it without even looking at it, but now it always opens in a new window instead of a new tab. Is it possible to change it back? Maybe in your own settings?

    You can use the menu editor extension to rearrange menu items - https://addons.mozilla.org/firefox/addon/menu-editor

  • Changed my country and tried to change it back and it freezes

    i heard on the internet that a song was released in london on i tunes so i checked the USA store and it wasnt there so i went into my account and changed my county. but now it wont let me change it back because when i try to change it, it freezes on me . please help

    Quit iTunes and Relaunch...
    If it opens change your Country back to the Original...
    More Info Here
    http://www.apple.com/support/itunes/troubleshooting/

  • I just changed my appleid and need to change it in the 4s to match?

    I've changed my appleid to a newer email address and I can't work out how to change it to match on my phone. The change has been verified via the new email address and I've tried synching 4 times.

    Sign out of old ID and sign in with new.
    Settings>iTunes and App Store>Apple ID

  • Chat Your case number: 0215462990 david stock Here's what we know about your issue so far. It relates to: Lightroom change Adobe ID and signing in change Thank you for your patience.  While you wait, you can try our community forums where experts are avai

    Cant download LR5 updates ... This is the 'help' Ive received so far ...

    To update to 5.7.1 go to the LR5 menu and click Help >> Updates. To buy LR6 use this link, click the Buy button and choose upgrade price. You can download from  here

  • Changed my ISP and got a new email address

    OK, I've changed my ISP and email address, changed the info with my Apple ID, but my receipts are still going to my old email address. How can I get the receipts to go to my new email address?

    Go into iTunes > help and support
    and get the link to email iTMS Customer Support.

  • I Changed My Number And Need To Know It, Where Do I Find It?

    I just changed my number and it doesnt change until the 8th, I cant find the new one anywhere online where could I find it?

    If you forward dated a number change to avoid pro-rating your bill (usually a good move!) then you may have to wait until the 8th to find out the new number.  I haven't done this before, but Verizon may wait until they actually assign you the new number to pull it from their "available" pool and connect it to your account.
    When you initially set up the change, did it tell you the number?  If so, calling *611 should help, the rep should be able to see it.

Maybe you are looking for

  • IE11 can't post form data to specific frame or window dialog opened via window.open()

    Hello, Form POST targeting to specific frame or dialog popped up via window.open() no longer works in IE11. It worked fine in IE10 and all previous versions of IE. Please see screenshot attached with simple test that reproduces this problem. Direct L

  • SAP BO UNIVERSE AND REPORTS

    Dear all,      I am a beginner to the Business objects.  I want role and responsibilities of BO projects.  And I want common errors of webi reports and crystal reports and sap universe creation and non sap universe creation.  Thanks, Baskaran.

  • Any luck with user exit BCS2S?

    I am trying to enhance the partner master data on a CRM 4.0 system and replicate these data to the R/3 backend. This seems to work up to a point. My goal is to implement the R/3 field KNVV-PERFK in CRM, allowing users to maintain customer data in CRM

  • Error ae.blitpipe

    Hi I have the following problem, My After Effects CC keeps crashing when I start it off. Error: ae.blitpipe Do you know a solution. My computer is good enough so all system requirements are met.

  • Help please? This is driving me MAD!!!

    I have a gui and in it is a JLabel. The text for the JLabel is gained from a method class to another class. The information is constantly changing and the JLabel needs to keep up to date. At the moment, i have a JButton that calls the method and then