Azure LocalCache not setting the Ready environment variable on ASE

北城余情 提交于 2019-12-06 03:05:19

Local Cache is a feature which is not currently enabled in App Service Environment.

Gavin Stevens

The correct answer here is this:

As the documentation you referenced mentioned:

How can I tell if my site has switched to using Local Cache?

If you're using the Local Cache feature with Staging Environments, the swap operation does not complete until Local Cache is warmed up. To check if your site is running against Local Cache, you can check the worker process environment variable WEBSITE_LOCALCACHE_READY. Use the instructions on the worker process environment variable page to access the worker process environment variable on multiple instances.

You stated: If I use Kudo and go to Process Explorer, Click on properties for the w3wp (without the scm label) process, then click on Environment Variables the only variables I see are:

WEBSITE_LOCAL_CACHE_OPTION Always APPSETTING_WEBSITE_LOCAL_CACHE_OPTION Always WEBSITE_LOCAL_CACHE_SIZEINMB 1000 APPSETTING_WEBSITE_LOCAL_CACHE_SIZEINMB 1000 WEBSITE_LOCALCACHE_ENABLED True

This environment variable WEBSITE_LOCALCACHE_READY is part of the "Worker Process", not the host process w3wp.exe

You need to get a memory dump of the worker process as outlined here: https://github.com/projectkudu/kudu/wiki/Process-Threads-list-and-minidump-gcdump-diagsession#process-environment-variable

Start with:

GET /api/processes/0 => detail process information of scm site's w3wp.exe. Or use -1 for main site. https://(kudu-site).scm.azurewebsites.net/api/processes/0 (Shows the w3wp.exe process)

The "main site" is the worker process. https://(kudu-site).scm.azurewebsites.net/api/processes/-1

This shows a full process dump, in the contents you will see your variable: "WEBSITE_LOCALCACHE_ENABLED":"True","WEBSITE_LOCALCACHE_READY":"TRUE"

I have this running in an ASEv2 as well, so I don't think the comment earlier from cory-fowler that this isn't supported in an ASE is correct. Maybe it was when he wrote it, but currently it is supported.

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