The admin in Magento 2.0 logs out way too quick. How do I lengthen the time allocated?
In Magento 2: Go to admin -> stores -> Advanced -> Admin -> Security
change value Admin Session Lifetime (Second)
If this post helps your solution then please mark as accept.
You might also need to increase the session lifetime in PHP which is controlled by the two following variables:
session.gc_maxlifetime (default: 1440 seconds) controls how long an idle session is kept active before the garbage collector will recycle it. You need to set this value equal to or higher than the Admin Session Lifetime.
session.cookie_lifetime (default: 0) defines the maximum lifetime of a session, regardless if the user is active or not. This setting can usually be left at the default value 0, which means that the session will last until the browser is restarted.
To change the value of any of these settings you can edit the php.ini file, or if you are on a shared host you can often override it in .htaccess like this:
php_value session.gc_maxlifetime 3600 php_value session.cookie_lifetime 0
I hope this helps!