First, look up session.gc_maxlifetime in the manual Unrefreshed sessions become subject to deletion after session.gc_maxlifetime seconds, regardless of what you might do to the cookie.
Then look up session.cookie_lifetime, which you will see defaults to 0 (cookie dies when browser is closed).
As noted on the manual page, you can change that value with a function call.