K
K
Kirill Gorelov2021-07-03 11:32:47
PHP
Kirill Gorelov, 2021-07-03 11:32:47

Php out of memory?

Symphony 3.
The project is simple, it just reads someone else's api and writes data to itself.

A classic of the genre, locally everything is OK, memory consumption is 56 MB.

I'm transferring to vds with 1gb ram.

Fatal error: Out of memory (allocated 569720832) (tried to allocate 20480 bytes) in /vendor/spoon/library/spoon/database/database.php on line 675

Fatal error: Out of memory (allocated 569720832) (tried to allocate 20480 bytes) in /vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php on line 644

phpinfo writes memory_limit 128.
Set ini_set('memory_limit', '1024M');
The script ran a little longer, but still threw an error....

I don't think it takes more than 1GB of RAM to read a few thousand data from api......

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lazy @BojackHorseman PHP, 2021-07-03
Tag

the system ran out of RAM. the limit specified in ini is not exceeded. it is obvious that not only your script eats memory.
texts of errors different if that.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question