seleium firefox driver running memory high after opening windows. - windows

I am running a selenium project that crawls through websites. The project opens links in new pages and checks for content, then closes the opened window. I have noticed that after about 5 minutes of opening windows the ram runs about 3gb out of 4gb for firefox in the task manager. There are other programs running as well, so everything gets slow and starts stalling. I am curious as to why firefox's ram does not reduce after closing the window, but continues to climb. I have tried using firefox cache preferences and sessionstore preferences, but nothing has helped. Has anyone encountered a similar problem or know anything about this? Running selenium 2.53 on firefox 41.

This is the best solution. Without knowing your exact setup I'm going to explain what fixed the memory leak for me.
I'm running a few extensions in Firefox, Adblock Plus, Auto Refresh, and others. I disabled my extensions to see if that fixed the problem, it did!
Keeping a couple on at once I narrowed it down to Adblock Plus, and found that other people have had memory leaks with it as well, so I switched it out for uBlock Origin. I hope this helps.

Related

Running firefox remotely suffers from X11 bottleneck. Why is JupyterLab (running from same Linux server) different?

I want to deploy my machine learning web app on a Linux server. I find that when I open Firefox (remotely via Mobaxterm), it is too slow due to the X11 bottleneck.
Now I have access to Jupyterlab (directly accessible from the browser) running on the same Linux server which works without any delay.
Why is it so? What can I do to run my Flask app through Firefox without the delay, same as with JupyterLab?
(Your support in editing the question to make it clear will be appreciated)
Try out:
Put in the firefox address bar:
about:config
(click yes on the warning)
Look up:
gfx.xrender.enabled
set it from (default) False to True.
This is over ssh over local wifi....
without xrender, firefox versions of last several years would spend about 0.5-2 seconds per window sending the window content as some kind of raw, uncached image.. not terrible, but if you scroll it would just do 0.5-2 second a pop readraws as it scrolled, so not too good either. More recent versions (maybe due to webrender being on by default?) seem to send MB after MB after MB of traffic for like 30 seconds or more (don't know if it's from the page-load spinner or what), once the page does load it actually scrolls fast (the X server must have a local copy of the page content) but it takes far to long to get there.
xrender, it sends pixmaps to the local X server too, but uses a surprisingly low amount of traffic doing so. Pages like stackoverflow and lighter comic sites load indistinguishable from a local copy of firefox; sites with heavy graphics may spend a second or two sending the large graphics, but then they're in the local X server and the page scrolls around and operates at full speed.
Running xrender if you run firefox locally doesn't seem to cause any harm either (i.e. you don't have to turn the setting on and off depending on if you are using firefox remotely or locally.)
Enjoy the speed!
Cheers!
--Henry

Debug handing thunderbird lightning

Today lightning started to hang up thunderbird shortly after startup with 100% cpu, no I/O and constant memory usage. I verified the cause by deactivating it. Since this also happens with a completely different installation and a different server-side account, I suspect the server (owncloud) sends something awkward. I read about debugging a thunderbird extensions using the firefox tools, but I cannot connect the debugger, since the main drawing thread is blocked (and thus the connection cannot be accepted). The error console seems to be empty.
Is there any other known strategy to debug a running thunderbird/lightning app? Can I dump the js state? Log all lightning actions to the console? Any other idea to pinpoint the culprit?
You can use the remote debugging capabilities to capture a profile. This should be working even if most things are hanging, but from what you wrote it seems you've tried. If the problem is that you cannot access the dialog that asks to accept the connection, you can set a few devtools prefs to auto-accept connections. I believe this is devtools.debugger.prompt-connection which needs to be set to false.
Regarding logging, you can enable calendar.debug.log and calendar.debug.log.verbose in the advanced config editor. You can then set XRE_CONSOLE_LOG to output the console to a file. There is a page (although not official, or at least outdated) on debugging xulrunner apps. This pretty much applies to Thunderbird too.
You may also be lucky in contacting the Lightning maintainer to discuss debugging this, he is available on irc.mozilla.org #calendar and is named Fallen.

VS2010: Loading symbols from dlls very slow

I have a program which I am working on my Dell Laptop XPS 502X. At work, I usually have another monitor plugged in my DVI port and everything is fine. When I work from home, I only have the laptop screen. When I start the program in VS2010, it is very slow and I notice in the bottom of the screen Loading symbols for ...\NVIDIA Corporation\coprocmanager\detourel.dll... which takes around 10-20 seconds every time. Any idea on why this is happening ?
EDIT:
I thought it was a drivers problem, but now it happens again.
I tried the ideas posted in similar questions
-DeleteAllBreakpoints stuff, didn't work.
-No remote symbols fetch or network path
-Enabled Just My Code
Looks like a hook DLL injected by the graphics drivers... driving me crazy!
EDIT 2:
The problem happens on and off, today everything seems find, yesterday, I even noticed it was slow loading the GROOVEEX.dll while the program was running when I was starting a CFileDialog. So it might not just be something related to the graphics drivers.
It looks like nVidia's use of the Detours library from Microsoft. Hopefully this will help...
http://forums.nvidia.com/index.php?showtopic=212704
and
http://research.microsoft.com/en-us/projects/detours/
Run the msconfig tool that is built into Windows to take a look at some of the things that nVidia launches at startup. You may want to try disabling some of the startup items temporarily, but you'll want to research what each item you disable is before doing so, or you may have to go into safe mode to get back to a good state.

OpenGL randomly slows down

I'm currently learning OpenGL and I've noticed a rarely occuring performance problem:
My program is rather small so it's not a performance problem with the code itself, but when I'm running the code via Visual Studio I sometimes only get 1-2 FPS instead of the usual 60.
Once this happens I can restart the program as often as I want to (in debug and release mode alike) and it won't go away.
However, when I close my Firefox (or manually shut down the plugin-container.exe though task manager) and restart my program everything is fine again. After that I can start Firefox again (with the same tabs open) and the bug does not reappear.
I use the newest version of Firefox, and I've had this bug with several programs already - both made by me and others and using different versions of OpenGL. However I don't think I've had this problem when starting a compiled exe directly, but only by using the Run feature of Visual Studio.
I've searched the web but I only found a link about the generally bad performance of this plugin-container.
Does anyone else have this problem? Do you know any walkarounds or fixes?
PS: Regarding isti_spl's answer:
The CPU utilisation of the plugin-container.exe jumps to the 50% limit when the problem happens.
I'm working with Visual Studio, but the problem only occurs when I also have Firefox running (it most certainly is because of this plugin-container, so it probably won't happen with other browsers).
It's hard to isolate the problem because I can't replicate it. It might happen 1 out of 50 times.
I'll see if closing flash-related tabs (youtube, blip.tv etc) fixes the problem next time it happens.
Can you isolate the problem?
You first mentioned running visual studio then firefox. Please try to run separately.
Under FF. is it caused by WebGL or flash plugin? Is it caused by visiting specific sites?
Is it FF specific or happens under other browsers too?
Does CPU utilisation jump high? Please verify that too and which process consumes most CPU.
Not sure, but likely gpu driver + flash problems.
If so, the problem is not in your code, other GL program should be affected too.

IE hanging, using 100% of the CPU

I have a web application, which in the course of a normal interaction, hangs IE. By "IE being hung", I mean that IE doesn't respond anymore and using 100% of the CPU. The only to get out of this state is to kill the IE process. About the app:
It loads only one page in the browser, communicates with a server with Ajax queries, and updates the DOM.
I can reproduce this with both IE6 and IE7, but not Firefox or Safari.
I am wondering if anyone has seen this already, and if there are a few known cases that can get IE into this hung / using 100% of the CPU state.
Use WinDbg, http://www.microsoft.com/whdc/devtools/debugging/
Attach it to the IE process that has the problem.
The .symfix+ command will set your symbol path to point to the Microsoft symbol server and cache the debug symbols locally.
The !runaway command will enumerate all the stacks in the process and tell you which one is going berserk.
If you're lucky, you may see something recognizable, such as a regex replacement at the top of the stack. Or perhaps the layout engine has gone into an infinite loop. Both of these have happened to me in the past.
If the callstack doesn't make sense, use 'g' to make the process go, wait a few seconds, hit Ctrl+Break, then try !runaway again.
Once you've got the symbols locally, you can also use SysInternals' Process Explorer to look at a process's stacks. Configure the Symbols option in Process Explorer to point to your local symbol cache, something like c:\Program Files\Debugging Tools for Windows\sym.
Try attaching the script debugger (via Visual Studio, in my case), and see what is causing it.
Most likely it's a javascript running an infinite loop, or just looping too fast for what needs to be done per ajax request.
Have you tried tracing the problem? If the problem also happens in IE8 you could use console.log commands and their awesome new debugger/dev tool that's built in. Otherwise use the old dev toolbar for IE or alerts. Try to reduce the problem and then file a bug (and paste the code here please).

Resources