Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Phalcon3 - Model::Find() with bind high memory usage (PHQL cache).

I tried the solutions provided before on similar issues.

https://github.com/phalcon/cphalcon/issues/2705 https://docs.phalconphp.com/en/latest/reference/models-cache.html#caching-of-phql-planning https://forum.phalconphp.com/discussion/3652/out-of-memory-when-doing-find-

find() with bind, FindByid and FindFirstById has got a high usage of memory, probably PHQL cache is not working properly. The only thing I have different is ColumnMap but I do not thing that might be the case.

Anyway I am going to try and debug the issue, if anyone has any insight or solution I am most thankfull :)

$di->modelsManager->__destruct() does not solve the issue, memory leak?



33.6k
Accepted
answer

Memory leak is caused by the use of dynamic properties, you can declare all your properties in the model as a workaround.

Hey andy, Thanks that solves most of it, thank you.