CodeIgniter Forums
Error max connection database - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Error max connection database (/showthread.php?tid=74197)



Error max connection database - omid_student - 08-21-2019

Hi
I have error already has more than 'max_user_connections' active connections codeigniter in my project
Do i have to upgrade my host or my programming is mistake?
I use Restful and use limitation for controller with database also use api key with database
Can they affect on database connections?
Thanks


RE: Error max connection database - php_rocs - 08-21-2019

@omid_student,

What are your CI database connection settings? This is probably not a programming mistake. It is probably more of a database setting. Hopefully more on your end instead of the host's end.


RE: Error max connection database - InsiteFX - 08-21-2019

If you are opening the database try closing the connection afterwards.


RE: Error max connection database - omid_student - 08-21-2019

(08-21-2019, 07:26 AM)php_rocs Wrote: @omid_student,

What are your CI database connection settings? This is probably not a programming mistake.  It is probably more of a database setting.  Hopefully more on your end instead of the host's end.

My database setting is OK
We understood one body try to execute special api that it was very unsecured
Thanks


RE: Error max connection database - omid_student - 08-21-2019

(08-21-2019, 08:01 AM)InsiteFX Wrote: If you are opening the database try closing the connection afterwards.

As far as i know Codeigniter auto close database connection,Isn't it?


RE: Error max connection database - dave friend - 08-21-2019

(08-21-2019, 11:34 AM)omid_student Wrote:
(08-21-2019, 08:01 AM)InsiteFX Wrote: If you are opening the database try closing the connection afterwards.

As far as i know Codeigniter auto close database connection,Isn't it?

Yes, when script execution ends PHP will close the database connection.


RE: Error max connection database - InsiteFX - 08-21-2019

Thanks, I know that it will close it, I was not sure if he was using a custom
database access.


RE: Error max connection database - omid_student - 08-22-2019

Thanks guys,problem is host or my code
On of my function is send sms to user
I think this function take 3 second for send it
Can it affect on cpu?