We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Fatal error: Allowed memory size on Models Php7

Php7 + Nginx + Php-FPM

Project and Models created with Phalcon-devtools 2.1

Its a empty table, using method Web::find(null);

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 1082375337 bytes) in /var/www/html/test/apps/models/Web.php on line 89

Web::find(null); exactly this is causing this error ? What happens if you remove null ? There are many bugs in zephir on php7 which phalcon is using. Did the same cod works on php 5.6 ? Phalcon isn't stable on php7 right now and shouldn't use it. Many bugs can happen in many places.

I tried with or without null

Is this exactly , create a new project, ( works and load fine ) create a model, try to use, error starts

Yep i i thought Rc1 was getting better.

Ty

edited Mar '16

Just to complete, If i do a Select i get a memory leak error. if i try INSERT i gotta page 404.

Not Working

$model = Tst::find();

Working

$as = $this->db->query('SELECT * FROM tst'); $result = $as->execute(); var_dump($as->fetchAll());exit;

edited Mar '16

Time Memory Function Location

1 0.0002 359608 {main}( ) .../index.php:0

2 0.0014 391104 handle ( ) .../index.php:36

3 0.0032 417984 dispatch ( ) .../index.php:36

4 0.0032 418016 _dispatch ( ) .../index.php:36

5 0.0067 420920 callActionMethod ( object(Teste\Frontend\Controllers\IndexController)[31], string(11), array(0) ) .../index.php:36

6 0.0067 421304 Teste\Frontend\Controllers\IndexController->indexAction( ) .../index.php:36

7 0.0073 434328 count ( ) .../IndexController.php:12

8 0.0073 434432 _groupResult ( string(5), string(8), null ) .../IndexController.php:12

9 0.0077 438576 execute ( null, null ) .../IndexController.php:12

10 0.0077 438600 parse ( ) .../IndexController.php:12