Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
I must disappoint you, but the phrase "php is made to die" applies exactly to your problem. The core of the language itself does not provide a scenario for the "eternal" work of the script. Memory is consumed inefficiently and Fatal error: Out of memory is what your script is waiting for in any case.
The simplest solution in your case is to run your test script with a cron. Let's say, every minute, let him work and die. And so every minute.
does php have a memory leak concept? yes, it can be clogged with something (already unnecessary) as the script runs, but in the end it all comes down to the death of the process and this should happen as soon as possible.
for your task, you can take nodejs + 2 libraries + 40 lines of your code
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question