Hello everyone!
I have a command-line script for crontab, that daily updates some data in DB and can make a lot of UPDATE-queries (about 30k or more on a single script run). At some point it just stops with "allowed memory exhausted".
Script itself is pretty simple - it queries XML from another server, parses it and then starts updating records in a loop. Something like: foreach($xmls as $xml) { $record = Record::findFirst($xml->id); //Phalcon\Mvc\Model $record->setName(...)->setAnotherData(...)->save(); } Just find-update-save, records were not stored in any arrays. And only one record at a time.
Does Phalcon internally keeps some record/query cache that can overflow while querying/updating more and more records? If so, can it be disabled or at least cleared from script?