cancel
Showing results for 
Search instead for 
Did you mean: 

First session activity drops sessions

First session activity drops sessions

I'm running an Nginx sandwiched Varnish backed magento 2.3.6 shop in development mode, set up like:

 

Frontend nginx port 443, varnish port 80, backend nginx port 8080, plus redis for session cache.

 

Nothing strange, fairly common setup. Running in development mode.

 

Been developing my shop without varnish, but now after enabling varnish it seems that when I start my site with a clean magento cache, clean redis, clean varnish, and visit my site, add a product to the basket, after ~2 seconds I can see the cart being emptied. Same happens when I log in for example: logging in succeeds, clicking on one of the account items, such as "view orders", I'm logged out again. After doing the same routine again, I remain logged in, no session loss anymore. Until I clear cache, restart varnish, same thing happens again.

 

After reading the entire internet, I'm at a loss. Disabling Varnish fixes this issue. Disabling Redis does not.

 

After the first occurence, trying to reproduce the issue, it does not happen again. When I enter production mode, it also doesn't happen.

 

Anyone has some pointers on the fix? Or some pointers on the troubleshooting? I've been looking for some 'advised' setup with Nginx SSL offloading in combination with Varnish, but the ones I can easily find on the interwebs seem to do the same as I'm doing....

 

thx in advance.