Why do my instances recycle when trying to store sessions in co-located Azure cache?

ⅰ亾dé卋堺 提交于 2019-12-13 07:39:13

问题


I run an ASP.Net MVC3 application and have followed this Windows Azure How-To on how to store my sessions in a co-located cache in Windows Azure.

I have installed the mentioned Nuget-package, and applied the necessary information to my web.config. The web role is setup to run 2 small instances, and use a 30% co-located cache.

When I deploy to Azure, my instances just recycle. Through a remote desktop connection to one of the instances, I have found these two events in the logs, that seem related:

The CacheStatusIndicator service terminated unexpectedly. It has done this 1 time(s). The following corrective action will be taken in 1000 milliseconds: Restart the service.

The CacheService service terminated unexpectedly. It has done this 1 time(s). The following corrective action will be taken in 60000 milliseconds: Restart the service.

However, I cannot find much information on that.

Does anyone have a clue what I might be missing here?


回答1:


I am very much sure that your role is missing some of the reference and because of that your see such message from CacheStatusIndicator. Have you verified that your role does have all the modules/references set to "copy local as true" so all of them are part of deployment package. Mainly it is a MVC3 app, you may need to manually set app MVC specific references property to copy local as true to resolved this problem.




回答2:


Now I spent my shared amount of time dealing with this, and finally it seems to be working. Not sure exactly what part solved the problem, but I'll wrap up the changes I made, in case someone else have the same issue at some point.

  1. While debugging this issue, I also updated my application from MVC3 to MVC4. Not sure if that has anything to do with solving this problem, but at least it is one of the changes I made.
  2. I noticed that another exception was thrown by the the IntelliTrace service, so I disabled that in the deployment and re-deployed the application (my guess is that this problem is what actually caused the instances to cycle.

Response from Microsoft Support on this issue:

I was troubleshooting your deployment with the issue and I got a memory dump from the CacheService.exe

This was the exception being thrown

CLR exception type: System.TypeInitializationException "The type initializer for 'Microsoft.ApplicationServer.Caching.AzureCommon.AzureUtility' threw an exception." ModLoad: 000007feea010000 000007feea0fa000
D:\Windows\Microsoft.NET\Framework64\v4.0.30319\diasymreader.dll * ERROR: Symbol file could not be found. Defaulted to export symbols for D:\windows\system32\KERNEL32.dll - ntdll!ZwWaitForMultipleObjects+0xa: 00000000`76f5739a c3
ret

The exceptions on this namespace can happen if:

  • You set the Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString setting on ServiceConfiguration to use the local storage emulator
  • On the web.config you have the identifier value of the <dataCacheClients> section not set to the correct role name
  • In some rare cases if you have the SDK 1.6 and 1.7 installed together this can cause some mixed up DLLs when project is being built.


来源:https://stackoverflow.com/questions/12052589/why-do-my-instances-recycle-when-trying-to-store-sessions-in-co-located-azure-ca

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!