• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database sessions and garbage collection

(03-08-2015, 09:34 AM)kozzleto Wrote: It's worth mentioning that I have an extra column `user_id`(int 20) in the `sessions` table to easily identify my online users.

This would be the first thing I would look at. My best guess would be that whatever you are doing to maintain the user_id in the session table is interfering with the session driver's maintenance of the sessions.

I would recommend using a reference table (user_id, session_id) for this, instead (with the user_id set as a unique value so you don't end up with multiple session_id entries per user). You could then use an inner join when retrieving the online users to ensure you only get session_id values which are in both tables.

Messages In This Thread
RE: Database sessions and garbage collection - by mwhitney - 03-09-2015, 11:29 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.