hello all,

my question is how do i prevent mechanize from eating ram viciously?

i've only been messing around with


  for a month or two and i wrote a few scripts that automate some sites and when i run them i noticed it takes 15min to eat the 512mb of ram

i'm sure that its the way i wrote the scripts its just that i don't know what i did wrong.. i compared them to other ones available out there and mine look retarded lol, a million if else statements etc... but there is no errors.

any advice?


Hi jubegnx,

that's not easy to answer without knowing the code.

Maybe your arrays are not emptied. If you could give some more code details
or send me the code I would check it.



ok i'm in the middle of trying to fix some things, when i'm done i'm going to run it one last time and then il send it over... thanks


Make sure you clean the history.

Most people forget that Mech has a real history function (backwards, forwards, reload etc.) so that is what consumes the memory


hey dirk, i tried the stack_depth option but now i cant run more than one instance of the script and also it doesn't fully finish the cycles?

** actually it stops within minutes of starting


Have you tried to use different values for stack_depth?


my mistake, yep the value 1 works i ran 10 instances of the script and it was fine finished the whole thing without running out of memory...


Perkiset's Place Home   Politics @ Perkiset's