-1

ISSUE

Hi everyone, I looked for the solution in stackoverflow but i not found it. I'm working with CodeIgniter framework and since a few months i got this error.

SOLUTION TRIED

Change max_connection in my database (phpmyadmin)

Verify close of database connections

QUESTIONS

Do you think i need to change dbdriver to pdo, I currently use mysqli?

Should I put $db['default']['pconnect'] to true for the persistent connection?

POST VISITED

Codeigniter Too many connection __construct()

Persistant connections not working with mysqli driver in codeIgniter

WMonteiro
  • 107
  • 4
  • 13
  • Possible duplicate of [Codeigniter Too many connection \_\_construct()](https://stackoverflow.com/questions/37927984/codeigniter-too-many-connection-construct) – Bhargav Chudasama Nov 27 '18 at 09:48
  • I already saw that post but it doesn't resolve my issue look at solutions tried in my post – WMonteiro Nov 27 '18 at 09:53

1 Answers1

0

I would suggest adjusting the MySQL variable wait_timeout (documentation) to a lower value - try 300 to start with. (The default value is 28800.)

The value is set by editing the MySQL configuration file and restarting MySQL. Where that file is found and what it is called will depend on your operating system. The file is often named my.cnf or mysqld.cnf.

DFriend
  • 8,869
  • 1
  • 13
  • 26