Magento – Magento 2.3.2 Unable to send the cookie. Size of ‘mage-messages’ is 4191 bytes

cookiemagento2.3.2

Last two days suddenly my logs are filled with this in Magento 2.3.2:

report.ERROR: Unable to send the cookie. Size of 'mage-messages' is 4191 bytes.

In Stores>Configuration>General>Web

My Default Cookie Settings are:

Cookie Lifetime: 3600(default)

Cookie Path:

Cookie Domain:

Use Http only: Yes

Cookie Restriction Mode: No

Does anybody have this issue?
Can't find something related when I searched about

Best Answer

The error is because in the cookie mage-messages exists exception trace. Try to increase the value of \Magento\Framework\Stdlib\Cookie\PhpCookieManager::MAX_COOKIE_SIZE = 40960; And see in a browser response header value for set-cookie: mage-messages