Hi Eily . thank you for such a detailed answer!
Actually, I wrote the two script with the fork.pl call another crawler.pl .The two script memory will keep increasing, I suspect I wrote the script with some problem, the reference count not zero, so the memory is not released.
$fork, I placed in sub Config, $fork=$json_conf->{'fork'}, I set up 500 in the conf.json file.
undef, I tried to release the memory, really no effect !
Two while (1): are a crawler script, the first while (1), I let it keep running. While the second while (1), because I found that sometimes get error (it seems that SSL error or other things what I forget) the script will be directly out.So I have a idea with eval, it can work, although it is not perfect, let me change it again :)
You suggest to changed script to modules, whether should also solved memory surge problem ,so that it will have effect ?
I would like to use the Devel:: Peek module, but 5.20.3 version can not install, I do not know how to analyze the problem of memory surge, please help me to check Thanks a lot!
In reply to Re^2: Memory has been increasing, unable to release memory.
by Perl_Love
in thread Memory has been increasing, unable to release memory.
by Perl_Love
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |