USERSTORE_TOKENPERM growing very fast

  • Hi folks,

    I'm experiencing a very weird problem with userstore_tokenperm clerk recently.

    We have an environment with some databases in contained mode executing in version SQL Server 2017. Anyway i'm facing this problem since the SQL Server 2016.

    At a certain moment this cache starts to grow at a rate of 6GB by day. When this ocurr we have to do a failover and restart the principal node of AG.

    Run DBCC FREESYSTEMCACHE ('TokenAndPermUserStore') does not clear the cache. We are considering to use the trace flags 4621 as suggested by microsoft to avoid this memory pressure, but i want to know if someone has a tip to help me  to understand this behavior. This seems like a memory leak, because even running DBCC FREESYSTEMCACHE the objects are not released from memory.

    We have around to 70 users in contained mode in this server and when the cache starts to grow it grow until starve the server for memory.

    I tried to find out what kind of class of token is present and the worse instance have only this entrys.

    In sys.dm_os_memory_clerks we already faced more than 30GB of consumption

    Someone please can help with some troubleshooting hint or even with an experience about this kind of problem.

    Thks in advance

     

     

    • This topic was modified 4 years, 10 months ago by  rcardoso.
  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • No idea, but a couple responses from Twitter.

    Gail Shaw - https://sqlinthewild.co.za/index.php/2008/05/02/token-and-perm-user-store-growth/

    There's a couple settings in sp_configure, about access buckets. Fiddling with those might help.

    Erin Stellato - I've seen a recommendation from MS (to a customer) to use TF 4610 to increase the size of it on a SQL Server 2016 instance. May still be a factor for instances that are multi-tenant and host hundreds of DBs.

     

  • Thank you for your reply. I was wondering if is possible to know which querys or users are responsible for this cache entrys. Because i don't have ideia of what can cause such rapid growth.

    I'm checking the use of this cache, and when it starts to grow, it grow very quickly

    Again, thanks a lot Steve!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply