Php – timeout setting under apache2handler in the php.ini? Does affect session time out

configurationPHP

I would like to know what the following means under apache2handler in the php.ini

Timeouts  Connection: 10 - Keep-Alive: 10

I have I problem with session timing out after 10 minutes of inactivity, and I was wondering if the above is what is causing session to time out in 10 minutes instead of 4 hours like I have it below.

Currently my sessions settings under the php.ini are set like this:

session.cache_expire    180 180
session.cache_limiter   nocache nocache
session.entropy_length  0   0
session.gc_divisor  10  1000
session.gc_maxlifetime  14400   14400
session.gc_probability  1   1

Best Answer

These two timeouts have no effect on sessions, no.

The first one, "Connection", defines how long the server waits before failing a request. In your case, if your browser opens a connection and stays idle for more than 10 seconds, the server will reject and close the connection.

The second one, "Keep-Alive", defines how long a persistent connection will stay open. That is; Apache allows multiple requests to be passed via a single connection to increase performance. This defines how long it will remain open between requests before closing the persistent connection.

Related Topic