Hello!
I recently got a strange error on my production servers (which are luckily not live yet) that suddenly appeared.
The error message is this:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted
On the line reported, I have the database adapter setup for the DependencyInjector:
$dbAdapter = new Mysql(
array(
"host" => $dbConfig["host"],
"dbname" => $dbConfig["database"],
"username" => $dbConfig["user"],
"password" => $dbConfig["password"],
"charset" => "utf8"
)
);
I've dumped the $dbConfig
-variable which contains the proper information, with which I can connect manually to the database. I have also upped the memory limit, and this just exhausts any memory I allocate.
Can anyone help me troubleshoot this?
Thank you!
// dimhoLt
EDIT: I am also getting this error when running Model::find()
from my unit tests, but not my dev server. What's going on??
EDIT2: It appears that I may be on to something. I had not set up my testing user database settings properly, so the testing environment didn't manage to connect to the database. Also, it seems that my sysadmin had set up database replication with a new database IP address on the production servers, breaking my database settings there as well. I will be able to fix this tomorrow and will get back with the results. I will still keep this issue open until I've tested that though since I used to receive the error message from the database (could not connect
, access denied
or similar, instead of memory exhaustion which I now get).