CodeIgniter Forums

Full Version: codeigniter database backed sessions GET_LOCK high number of connections
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?