Today we were facing Can not write database session error and no one could login:
[Thu Jun 20 08:48:13.931815 2019] [:error] [pid 126630] [client 1.9.61.130:2914] Cannot obtain session lock for sid: xx, referer: xx
[Thu Jun 20 08:54:54.317362 2019] [:error] [pid 128045] [client 202.162.18.130:57559] Can not write database session - please verify max_allowed_packet is at least 4M!, referer: xx
[Thu Jun 20 08:54:55.183066 2019] [:error] [pid 128148] [client 203.115.247.114:9585] Can not write database session - please verify max_allowed_packet is at least 4M!, referer: xx
[Thu Jun 20 08:54:55.200976 2019] [:error] [pid 128059] [client 14.192.212.57:17783] Unknown exception when writing database session data : xx- Error writing to database, referer: xx
I even tried to increase the max_packet_allowed to 32M but still, login not successful.
I had read about the DB sessions and its problems, but always skeptical to make the change. And today after finding some previous discussions over this, I decided to add the following onto my config.php:
$CFG->dbsessions = false;
Immediately the login problem has resolved. But now, reading pros and cons of the file method, I am wondering what performance issues I should be monitoring?
Please advice.