in reply to Re: Memory has been increasing, unable to release memory.
in thread Memory has been increasing, unable to release memory.
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Memory has been increasing, unable to release memory.
by Eily (Monsignor) on Mar 27, 2017 at 16:00 UTC | |
by Perl_Love (Acolyte) on Mar 28, 2017 at 01:18 UTC | |
|
Re^3: Memory has been increasing, unable to release memory.
by Anonymous Monk on Mar 27, 2017 at 17:08 UTC | |
by Perl_Love (Acolyte) on Mar 28, 2017 at 01:30 UTC | |
by Anonymous Monk on Mar 28, 2017 at 16:38 UTC | |
by Perl_Love (Acolyte) on Mar 29, 2017 at 13:03 UTC |