CodeIgniter Forums
codeigniter database backed sessions GET_LOCK high number of connections - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: codeigniter database backed sessions GET_LOCK high number of connections (/thread-75026.html)



codeigniter database backed sessions GET_LOCK high number of connections - blasto333 - 12-10-2019

I am using CodeIgniter's database-backed sessions with persistent connections OFF.

Every once in awhile I have a lot of MySQL of connections pile up because of a lot of requests on the same session. I understand the reason locking is needed (Prevent concurrent writes), but the other downside is a lot of stress is put on the database server causing it to run slow until the connections are cleared out.

I tried Redis session driver but that performed poorly and its locking didn't seem to work as well as MySQL. (Performed poorly)

I use amazon web services RDS and EC2.

Would turning on persistent connections help this issue?