The Case of the Magento Admin Logout Issue

Published by John on March 2, 2023 Under Magento

While working on a custom Magento2 plugin to get quotes from Zonos Landed Costs API for overseas tax rates, duties, and fees, I ran into an issue when creating orders in the Magento admin where I would be logged out during the order creation process.

Initially, the issue occurred after selecting a customer, adding products, and then clicking on the shipping ‘Get shipping methods and rates’ link in the Shipping Method section. Since I had been working on a custom plugin for getting shipping rates, I assumed it was related to that, so spent a good deal of time debugging this, as well as the other shipping and payment method plugins.

However, after disabling and enabling a number of plugins and other troubleshooting, I was able to replicate the issue when creating an order with a new customer and adding a product, so I knew it was probably not related to the shipping, payment, or tax plugins.

There were no errors in the exception.log, system.log, debug log, or any of the server access or error logs, which made troubleshooting more difficult.

Eventually, I determined that the issue was related to the admin session getting cleared or corrupted, which has the side effect of logging you out of Magento.

I increased this setting and the issue was fixed: Configuration -> System -> Security -> Max Session Size in Admin

magento_max_session_size_admin


No Comments |

Comments are closed.