We have a 6 node galera cluster and following table:
mysql> show create table sessions;
| Table | Create Table
+----------+--------------
| sessions | CREATE TABLE `sessions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`session_id` varchar(255) NOT NULL,
`data` text,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `index_sessions_on_session_id` (`session_id`),
KEY `index_sessions_on_updated_at` (`updated_at`)
) ENGINE=InnoDB AUTO_INCREMENT=260176483 DEFAULT CHARSET=utf8 |
mysql> desc sessions;
+------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| session_id | varchar(255) | NO | MUL | NULL | |
| data | text | YES | | NULL | |
| created_at | datetime | YES | | NULL | |
| updated_at | datetime | YES | MUL | NULL | |
+------------+--------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)
We see many wsrep_local_cert_failures
on the nodes like this:
SHOW status like '%wsrep%';
| wsrep_local_cert_failures | 165419
galera debugging displays many conflicts:
THD: 251130, mode: local, state: executing, conflict: cert failure, seqno: 92044718
Binary logging is disabled. I can identify the queries with the thread id in the general log file:
251130 Query SHOW FIELDS FROM sessions
251130 Query SELECT sessions.* FROM sessions WHERE sessions.session_id =
'3d1d7f8638dbfd12ee58fa78d4f0998c' LIMIT 1
251130 Query BEGIN
251130 Query INSERT INTO sessions (session_id, data, created_at,
updated_at) VALUES ('3d1d7f8638dbfd12ee58fa78d4f0998c',
'BAh7BkkiDnJldHVybl90bwY6BkVGIgYv\n', '2016-01-04 10:48:52', '2016-01-04
10:48:52')
251130 Query COMMIT
The Application generates the session id. Any idea?
Whats wrong with session id's and how to resolve the conflicts.
Thanks
Swapping on the hosts was the reason. We have no errors after setting the correct innodb_buffer_pool_size and restarting.
Thanks for helping.