I moved the options for cron job down to 5 min. and I moved the purge times down to 30 min.

Thanks
Robert

CommentFileSizeAuthor
#13 session_expire.patch1.66 KBrmiddle
session_expire.patch1.65 KBrmiddle

Comments

rmiddle’s picture

This patch should work with both 5 and 6. It is really small.

Thanks
Robert

kbahey’s picture

Title: I need my sessions cleared a little more freqently the you have it setup for. » Clear sessions more freqently
Status: Needs review » Active

This is too frequent to be of general use. It would also be too heavy for cron.

However, if a couple more people voice their support for this, I will include it.

rmiddle’s picture

Well it is cool either way. I didn't remove any options or change the default but it is your call.

Thanks
Robert

nancydru’s picture

Status: Active » Reviewed & tested by the community

Looks good to me. I didn't experience any problems with the times. No one is forced to use the new values.

kbahey’s picture

Status: Reviewed & tested by the community » Needs review

Nancy

From your answer, it seems that you did not need less times as per this patch. Do you have a need for such more frequent timing?

That was the gist of my request from comments, not whether the patch looks good.

nancydru’s picture

I went down to 5 mins and the load on the server was not noticeable, even with cron running every 15 mins.

nancydru’s picture

Oh, you might want to have a way to occasionally OPTIMIZE the sessions table. Mine had way more overhead space that it was using.

rmiddle’s picture

kbahey,

I don't want you to do something you don't wont to do but I my case I need this ability and I hate having to manage forks. There are two changes here. One is how frequently to run the query and the 2nd is how old should the session be before the purge. Witch part do you object to.

Thanks
Robert

kbahey’s picture

I know what the changes do. The code is clear, and the changes are minimal.

My concerns are two fold:

- Sites normally run cron every hour. Although the settings of this module say you have to run it more frequently, people may get confused.

- Running cron that frequently may cause the site to slow down more frequently. Not only will we be running against sessions table, which is used all the time, but also search tables and other stuff. The locking can be problematic for large sites.

But note that I did not mark "wont fix". I am asking the community at large if such a use case is useful for others, so I don't turn down a potentially useful feature.

rmiddle’s picture

I can understand the first one what if I removed 1 hour and lower and added every for every cron run. That would remove the possible confusion on the 1st one.

Thanks
Robert

kbahey’s picture

I think that would be good.

nancydru’s picture

@kbahey: Not one of my sites runs hourly. I have the one site that runs every 15 minutes, several that run every 6 hours, and several more that run but once a day.

rmiddle’s picture

StatusFileSize
new1.66 KB

Updated Patch.

kbahey’s picture

Status: Needs review » Fixed

Committed to 5.x and 6.x

Thank you.

nancydru’s picture

@Khalid: have you considered Robert as a co-maintainer? I know his work is good.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.