Memory Leak with iMacros

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Memory Leak with iMacros

by access2vivek on Wed Nov 07, 2018 11:30 pm

Configuration
  • Windows 8
  • Firefox v. 53
  • iMacros for Firefox v 8.9.7

I run iMacros scripts for more than 10 hours each day on multiple Firefox profiles. When I do that, my computer starts to slow down after a while. To figure out what was wrong, I did the following tests on an Google Cloud Windows Image.

Script
The script is created with JavaScript. It reads a CSV file from the system that contains 100 entries. The entries from the file are read in a loop. The URL specified in the file is opened. After the URL is opened, a Screenshot of that page is saved on the system. The entire process is repeated till the end of the file is reached.

Test 1 - iMacros and Firefox
I ran the script normally and opened the Task Manager along side with it. As the script ran, I noticed that the amount of CPU consumed used reached 100% and the amount of memory consumed by Firefox started increasing. The memory slowly went from 34% up to 99% as the loop continued to run. Once the memory consumption reached critical level, I decided to stop the loop. Even after stopping the script, the total memory consumed by Firefox was still stuck at more than 2,500 MB. When it started, the memory consumed was around 112 MB and in the end, it reached almost 2.5 Gigs :shock:

This led me to believe that Firefox is hogging up Memory which is causing it to crash. So, I decided I will change the browser to Pale Moon and see if the results were the same.

Test 2 - iMacros and Pale Moon
I repeated the same experiment with Pale Moon and iMacros to see if I was getting the same results. After running the script, I noticed the same pattern. So, I thought that I need to clear the Memory consumed by Firefox so that it remains free.

Test 3 - iMacros, Firefox and Firemin
I did some research and came across the tool - "Firemin" which frees up the memory consumed by Firefox at really fast intervals. I set it up so that as soon as the Memory consumed by Firefox reached 200 MB, it should clear the memory consumed. I set the interval at one second so that it checks the same each second. Along with that, I also disabled Cache from Firefox so that it does not save anything from the web page as well.

I ran the same script again and noticed something really unusual. Firefox was running the script and after every few seconds when the Memory consumed reached the threshold limit, it would clear the memory and bring it to around 100 MB. I was happy that I had finally solved the problem of Firefox memory. :D

Sadly however, I noticed the Memory % still rising even after the memory was cleared. :? How is it possible that as the loop continues to grow, the memory used by Firefox is being refreshed to 100 MB after every few seconds but the total memory consumed by the system is still rising. Although the increase in memory wasn't as fast as in the earlier tests, it was still rising nonetheless. After around 70 iterations of the loop, the memory percent used went from 28% to 85+. I immediately shut off the script and the memory stopped rising. Still, the memory used was not free while Firemin was still reducing the memory used by Firefox.

Conclusion
This has led me to believe that the actual culprit is the iMacros extension that is taking up memory somewhere and it is not being cleared. May be the team already knows about it and they have fixed the problem in their future updates. But, searched for Memory leaks on iMacros on Google and did not find a satisfactory result, so I created this post.

I would like to know if someone else is facing the same problems too. I would really like to figure out a solution to this together. I think that the memory usage by iMacros might not be managed properly, but I am just a noob :P

Sorry for such a long post :mrgreen: !
access2vivek
 
Posts: 35
Joined: Wed Dec 20, 2017 3:00 am

Re: Memory Leak with iMacros

by speedz84 on Wed Nov 14, 2018 9:47 am

Hi,

I am also having a similar problem but with the Chrome Extension after running a loop to repeat 3000 times the extension crashes after it works for way to long without a browser restart so it's possibly a memory leak which overflows and crashes iMacros. It might be the same thing happening in the Firefox Browsers.

I made a separate thread about my experience viewtopic.php?f=21&t=29943

I hope they can fix these memory leaks and random crashes in the next version.
speedz84
 
Posts: 5
Joined: Mon Oct 22, 2018 7:16 am


Return to General Support & Discussions

Who is online

Users browsing this forum: No registered users and 11 guests

-->