K
K
khodos_dmitry2017-05-17 12:41:28
PHP
khodos_dmitry, 2017-05-17 12:41:28

Why does the script not finish its work and eat up all the memory?

I call the script in the cron at the following intervals: 30 */3 * * *
As I understand it, it should be called once every three hours.
The script has the following restriction:
ini_set('max_execution_time', '10750');
set_time_limit(10750);
ini_set('memory_limit', '2048M');
That is, it should work for a maximum of 3 hours.
But, based on the logs, the script does not finish its work, but works constantly and clogs all 8 GB of RAM.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
yazhog, 2017-05-17
@yazhog

Is there a loop in the script?
count the time since the start of the script and kill it if the time is exceeded

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question