• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database session table - IDs

#1
Hi folks, I'm using CI 3.0.6 with database session. I got these records:

[Image: print.png]

I'm wondering here... Why having 3 records with the same IP and timestamp, but different IDs? Also, different data sizes...

* * *

Here is my session config:

Code:
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'cisession';
$config['sess_expiration'] = 3600;
$config['sess_save_path'] = 'sessao';
$config['sess_match_ip'] = TRUE;
$config['sess_time_to_update'] = 300;

Thank you.
Reply

#2
Too broad to just guess.

I can tell you one thing that you're doing wrong for sure though - running 3.0.6 while the latest version is 3.1.4.

Also, 1MB of session data?!
Reply

#3
(03-21-2017, 04:09 PM)Narf Wrote: Also, 1MB of session data?!

Hi there, new day, fresh head... :-)

I was doing this:

Code:
$this->CI->session->set_userdata('paginacao', $this);

In a class constructor and having a property holding the Super Object CI... I'm afraid this was the cause for high data volume. I've just refactored to a local variable and things got OK again.

Just for curiosity: blob session field with super object CI: ~400 KB, then refactored without it: less then 1 KB :-D

Lesson: do not store the CI object at database session! I was doing this without notice.

Thank you!
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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