It is annoying to log in to the magento admin every few minutes, I find this solution to increase the time I hope it helps you
en la version actual 2.4 debes ir Store-> Configuración-> Avanzado-> Admin-> Security-> Admin Session Lifetime (segundos)
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityFor one year, just type:
bin/magento config:set admin/security/session_lifetime 31536000
in the current version 2.4 you must go to
Configuration-> Advanced-> Admin-> Security-> Admin Session Lifetime (seconds)
For command line: bin/magento confi:set admin/security/session_lifetime $value_in_seconds
By default, Magento 2 uses Session management as an anti-denial of service (DoS) practice for security purposes. It protects the Magento system from harmful API requests by limiting the maximum size of the session. By default, the maximum session size for the admin and storefront is set to 256000, which is 256KB.
Setting the value of the maximum session size to zero can disable the access for the admin and cause the issue that is discussed above. The error occurs mainly because the maximum session size has been reset to ‘0’ after the Magento upgrade. This terminates the admin session as soon as it is initiated and thus redirects the admin to the same login page.
Coming to the solution of the Admin login not working after upgrading to Magento 2.4.4, you need to increase the maximum session size in Magento 2. This can be done by running a simple command in the command line interface. You can run the following command to do that:
bin/magento config:set system/security/max_session_size_admin 2560000
This will change the maximum session size for the admin to 2560000, which is 2560 KB, allowing the admin user to log in and access the Magento admin panel.