dennismonsewicz
dennismonsewicz

Reputation: 25542

Codeigniter + Doctrine and too many mysql connections

I am running a large scale website with Codeigniter and Doctrine using RDS master/slave DBs, but for some reason I keep running into a Doctrine error of too many mysql hosts issue. The error tells me to flush the mysql hosts and it will fix the issue, and it does, but my question is, is anyone else experiencing this issue? If so, how are you getting around it so that it doesn't continually happen?

Upvotes: 0

Views: 1156

Answers (1)

BrynJ
BrynJ

Reputation: 8382

You say in your post title too many mysql connections, but in your question you say too many mysql hosts? If it is down to too many connections, then changing the following CodeIgniter default in the database config file might help:

$db['default']['pconnect'] = FALSE;

It defaults to true, meaning CodeIgniter uses persistent connections - which can be a problem depending on how many simultaneous visitors you have and also your webhost's mysql configuration.

Upvotes: 1

Related Questions