Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Memory has been increasing, unable to release memory.

by Eily (Monsignor)
on Mar 27, 2017 at 16:00 UTC ( [id://1186089]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Memory has been increasing, unable to release memory.
in thread Memory has been increasing, unable to release memory.

Anonymonk's answer seems to point out a good candidate for your memory problem. My suggestions were rather means to make your code easier to read and understand, which would make debugging easier. I'm sure that creating so many independant perl processes doesn't help though. Adding use strict; and use warnings; can help you solve your memory issues though, as it points out potential mistakes and known pitfalls.

And you're right about $fork, I did not see that it is indeed set. But this demonstrates that your code is hard to read. By the way, the & isn't necessary to call a function, instead, if you want to make a call more explicit, you can use parentheses, like this: Config();.

Replies are listed 'Best First'.
Re^4: Memory has been increasing, unable to release memory.
by Perl_Love (Acolyte) on Mar 28, 2017 at 01:18 UTC

    Hi~

    My other question:

    http://www.perlmonks.org/?node_id=1165988

    afoken reply about strict, I add use strict now.

    $fork.pl set max 500 fork, and all file is 300.

    Half the file called crawler.pl, and the other half of the file has been running in fork.pl.

    print account, I can't find anything problem

    Maybe I need to rewrite the whole program

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1186089]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-24 02:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found