A
A
Andrello2014-08-06 12:49:01
PHP
Andrello, 2014-08-06 12:49:01

Cron: Out of memory, what to do, where to dig?

Parse XML (simplexml), upload 1s, file 3MB. The script works fine on the site. I run cron - says little memory. I read that cron requires more memory.
What to do?
Warning: simplexml_load_file(): asdasd.xml:11425: parser error : out of memory error in ....

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2014-08-06
@begemot_sun

The server runs under its own php.ini, cron runs php in cli mode, in this mode another php.ini is used.
Increase the memory for the script somewhere around: /etc/php5/cli/php.ini

S
Stanislav Klementiev, 2014-08-06
@Marques

Add memory or increase swap (if any) or create.
ubuntulogy.org/docs/fs/3259

S
Sergey Petrov, 2014-08-07
@sergoslav_0

You can increase the memory by adding a line at the beginning of the php script :
where the value "1000M" is the amount of memory you need
. This usually helps.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question