My team (security analysts) are logged in on a daily basis to about 100 different management consoles of our customers. All under the same domain, for the sake of the question it will be:
{customer}.example.com
That nature of our work causes us to have well over 180 cookies for the domain example.com.
Which is the limit of chrome. After 180 cookies are reached he starts deleting the older ones. Which causes us to get logged out from random consoles all the time.
My question is, is there a way to tweak that number 180 for the domain example.com?
I really dug around and searched but could not find any setting to modify it, even in the chrome experimental features.
As indicated in the net/cookies/cookie_monster.h file from the Chromium source code, the limit is indeed 180. Unless you update that value directly in Chromium and compile your own version, there does not seem to be a way to change this.
You could also submit a Pull Request to Chromium that would add a switch to override this value: something like ./chrome.exe --domain-max-cookies=666.
// Cookie garbage collection thresholds. Based off of the Mozilla defaults.
// When the number of cookies gets to k{Domain,}MaxCookies
// purge down to k{Domain,}MaxCookies - k{Domain,}PurgeCookies.
// It might seem scary to have a high purge value, but really it's not.
// You just make sure that you increase the max to cover the increase
// in purge, and we would have been purging the same number of cookies.
// We're just going through the garbage collection process less often.
// Note that the DOMAIN values are per eTLD+1; see comment for the
// CookieMap typedef. So, e.g., the maximum number of cookies allowed for
// google.com and all of its subdomains will be 150-180.
//
// Any cookies accessed more recently than kSafeFromGlobalPurgeDays will not
// be evicted by global garbage collection, even if we have more than
// kMaxCookies. This does not affect domain garbage collection.
// See comments at declaration of these variables in cookie_monster.h
// for details.
const size_t CookieMonster::kDomainMaxCookies = 180;
const size_t CookieMonster::kDomainPurgeCookies = 30;
const size_t CookieMonster::kMaxCookies = 3300;
const size_t CookieMonster::kPurgeCookies = 300;