I just made a script in codeigniter which fetches emails and displays them with php imap. It fetches 500 mails at once no problem. If i try to fetch about 2000 mails at once, it throws an error.
A Database Error Occurred Error Number: 2013
Lost connection to MySQL server during query
SELECT GET_LOCK('77dfd862ae2b7bedaec521bc4c3651952b56e6c9', 300) AS ci_session_lock
Filename: libraries/Session/drivers/Session_database_driver.php
Line Number: 358
This project is live on hostgator. I am not sure if it has mysql workbench or not. I have no idea where it comes from and why. I have done nothing with mysql in codeigniter before.
I do not know which file to edit and where to start. Please help.