TestComplete Out of memory issue - automation

The problem we face when we try to run our automation script on for long hours is in between the execution we face with “Out of Memory” issue.This issue is bcoz GDI Object” leak happening due to which the RAM is becoming full and the tool is throwing the error.Is it possible to release these GDI objects through test complete script?

Maybe you are having a lot of performance counters on your project and the memory consumption for long executions are weird. Try removing all of them and reexecuting your project. I hope this solves your problem.

Related

Intellij IDEA 2016.2 high CPU usage

I have only one project (an ordinary SpringFramework project) opened. And the IDE is crazy using CPU:
JVisualVM CPU sample:
Note this happened just recently
Any idea?
The correct answer was posted by #matt-helliwell if you're coming from a version older than 2016.2.
File -> Invalidate Caches and Restart
If the above doesn't fix your problem, track this issue:
https://youtrack.jetbrains.com/issue/IDEA-157837
I invalidated the caches and it solved the problem for some time. But after a couple days Idea (my version is 2017.1.3) started to work slow with some freezing delays again. Finally I increased maximum available memory to 2 Gb (parameter -Xmx in idea.exe.vmoptions/idea64.exe.vmoptions file) and now it works perfect
I solved the problem by running idea64 bits :
JetBrains\IntelliJ IDEA 2016.2.4\bin\idea64.exe
Another possible solution, my IDEA was very slow because of a huge sql file open which was consuming all my CPU.
It took me a long time to notice this was happening only when opening a specific utility class with more than 1000 lines of code.
This class had maybe 50 public static methods (the reason why it is a utility class...), all pure.
At first, I thought it was stuck on a loop of "Performing code analysis" because that was the thing running heavily on the background as shown when hovering the mouse above a green check on top of the window of the offending class:
, but in reality, it was slowly scanning each instance in which the code was being executed in the entire source code.
It took like 45 minutes to scan the entirety of the class, the entire time the CPU usage at max (100%).
Once the class is closed the usage stops.
The issue (at least with AS Dolphin 2022-23) is that the analysis is never memorized, so if the window is closed, and opened later, the analysis begins from 0. So, it never gets cached...

Unable to control memory utilization on server increasing with ruby process

I have a Rails 3.2 application running on production server. The server has 8 GB of RAM and every other process works fine. But, there is a ruby process which keeps the memory utilization on the higher side. I have to manually login to the server console and type the TOP command and kill the process using the PID.
But, I am unable to figure out how to check which ruby process is taking so much of memory and also how to control it permanently.
Please suggest me a solution.
Thanks.
Could be so many things. Finding memory leaks is tough. What kind of application server are you using? If you're using Unicorn consider checking out Puma. It's actually really easy to switch over. We saw big gains in our app when we switched to Puma.
Also look through your app for n+1 queries. Optimizing some queries here and there would help tremendously.
Another thing you could consider trying is moving some longer running tasks to a background job with something like sidekiq.
Lots of performance monitoring services out there, like New Relic, that you could check out as well. Without more info it's a tough question to answer.

Instrumentation test run failed

I would like to ask a general question,
I am doing automation testing using robotium tool with the help of a tablet which is single processor. While performing some actions my test case is failing like INSTRUMENTATION TEST RUN FAILED DUE TO JAVA.LANG.OUT OF MEMORY error.
What i need is whether the out of memory error depends on the device processor speed also or purely it depends on the app and test code.
Any solutions can help me a lot
The OutOfMemoryError indicates that you've probably run out of heap space in the application. The device's kernel may set the limits on heap, but your problem is probably in your application and test code.
Does your test run out of memory while executing large tests?
You may want to profile your application for Memory Usage and start resolving memory leaks first.
It can also help if your robotium tests don't run for extended periods of time, but is only a band-aid if your application has memory leaks.

How to reduce PhantomJS's CPU and memory usage?

I'm using PhantomJS via Python's webdriver lib. It eats lots of RAM and CPU, and it's an issue because I'd like to run as many instances as it's possible.
Some google'ing didn't give me anything helpful. So I'll ask directly:
Does the size matter? If I set driver.set_window_size(1280, 1024), will it eat more memory than 1024x768?
Is there any option in the source code which can be turned off without real issues and which lead to significant memory usage reduce? Yes I still need images and CSS and JS loading and applying, but I can get rid of some other features... For example, I can turn off caching (and load all media files every time). Yes, I do need to speed it up and make it less greedy and I'm ready to re-compile it... Any ideas here?
Thanks a lot!
I assume you call phantomjs once for every rendering job. This creates a new phantomjs process every time. You could try batching as many as you could in the one js script and call phantomjs once for the whole batch.

Application Crashes due to Low memory

My app crashes after playing for more than 30 min on some screen due to low memory will my app get reject due to this?
actually i tried a lot to solve but it shows no trace in instrument i even did all permutation combination of code by commenting checking what causing the problem but i was not successful to solve it yet.
its an ipad application 3.2 sdk
I have notice many app which crash due to low memory and they are happily on app store
Any clues,suggestion ,advice will be appreciated.
Thanks in advance
Bill Bumgarner recently wrote up a blog post on using Heapshot Analysis to catch memory growth when some of the more traditional techniques fail. Although his write up is in the context of a Mac OS application, the technique should be equally applicable to iOS. Bill walks you through using the Allocations Instrument to do Heapshot Analysis and track down your leak.
Perhaps this technique will help you track down your memory issues.
See bbum's weblog-o-mat » Blog Archive » When is a Leak not a Leak? Using Heapshot Analysis to Find Undesirable Memory Growth