in reply to Again out of memory

You might want to have a quick read about formatting nodes. Specifically the <code> tags.

You might want to put some debugging code into your application to check that the values of $service and $cookie are being set correctly. If these values are incorrect your hash might well spiral out of control.

rdfield

Replies are listed 'Best First'.
Re: Re: Again out of memory
by derby (Abbot) on Oct 30, 2002 at 13:01 UTC
    ++rdfield.

    Without knowledge of the size of the log files all I can see is it is quite possible you are truly running out of memory. You could try, every so often, printing out your hash in scalar context ( print scalar( %CookHash ), "\n";) to see how hash buckets are being allocated. You may be near the end and that last hash allocation is sending you over the edge. There are a couple of small things you could do:

    1. pre-allocate the hash if you know exactly how big the hash will be.

    2. run against a small set of log files and produce some type of results for those and then run another script that sums up the initial results

    3. if you have enough diskspace, use a Tie::Hash or a DB_File or database (DBI) to hold the information.

    -derby