You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2014/12/02 23:55:13 UTC

[Bug 57300] New: mod_session_dbd should not save the session at each request

https://issues.apache.org/bugzilla/show_bug.cgi?id=57300

            Bug ID: 57300
           Summary: mod_session_dbd should not save the session at each
                    request
           Product: Apache httpd-2
           Version: 2.4.6
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: mod_session_dbd
          Assignee: bugs@httpd.apache.org
          Reporter: christoph.rabel@gmail.com

Whenever a session is fetched from the database it is immediately saved again:
(excerpt for a single request from mysql logfile)

91 Execute   select value from Session where sessionkey =
'1fad7788-c769-4872-aa77-00f1c7e95e50' and (expiry = 0 or expiry >
1417557643821571)
91 Execute   update Session set value = '...', expiry = 1417558643858512,
sessionkey = '1fad7788-c769-4872-aa77-00f1c7e95e50' where sessionkey =
'1fad7788-c769-4872-aa77-00f1c7e95e50'

While I understand that the expiry time has to be updated, is it really
necessary to do it for _each_ request? This is especially annoying since a
"Cache-Control no-cache" header is set and the update is done for each image,
js, css, ...

I propose to add a new option to allow to specify a "no-update-period-time"
based on expiry. Basically something like:
if (expiry + no-update-period-time < now) session_dbd_save(...);

While this will introduce some fuzziness to session expiry time, it usually
doesn't matter if the session expires a couple of seconds or minutes earlier.

Please see also:
https://issues.apache.org/bugzilla/show_bug.cgi?id=57299

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org