Reputation: 49813
I store my session in database with Codeigniter, maybe stupid my question, but i do not catched if session data has a size limit, and i can't understand what will happen in the app if reach that limit?
Thank you
Upvotes: 0
Views: 2313
Reputation: 1
hello guys set user_data in database with BLOB field size for fine et it 's recommanded by codeigniter documentation
CREATE TABLE IF NOT EXISTS `ci_sessions` (
`id` varchar(128) NOT NULL,
`ip_address` varchar(45) NOT NULL,
`timestamp` int(10) unsigned DEFAULT 0 NOT NULL,
`data` blob NOT NULL,
KEY `ci_sessions_timestamp` (`timestamp`)
);
Upvotes: 0
Reputation: 1429
There is no limit when using database to save sessions. CI serializes the data using serialize and saves it to database.
Only limit then could be the field in the database, which differ in cases:
TEXT 65,535 bytes ~64kb
MEDIUMTEXT 16,777,215 bytes ~16MB
LONGTEXT 4,294,967,295 bytes ~4GB
Upvotes: 2
Reputation: 1527
you can store user_data in database with TEXT field size, TEXT field can store ~64kb.
Upvotes: 2