I think I've got a memory leak and could use some advice

We've got ourselves a sick server/application and I'd like to gather a little community advice if I may. I believe the evidence supports a memory leak in my application somewhere and would love to hear a second opinion and/or suggestions.
The issue has been that used memory (as seen by FusionReactor) will climb up to about 90%+ and then the service will start to queue requests and eventually stop processing them all together. A service restart will bring everything back up again and it could run for 2 days or 2 hours before the issue repeats itself. Due to the inconsistant up time, I can't be sure that it's not some trouble bit of code that runs only occasionally or if it's something that's a core part of the application. My current plan is to review the heap graph on the "sick" server and look for sudden jumps in memory usage then review the IIS logs for requests at those times to try and establish a pattern. If anyone has some better suggestions though, I'm all ears! The following are some facts about this situation that may be usefull.
The "sick" server:
- CF 9.0.1.274733 Standard
- FusionReactor 4.0.9
- Win2k8 Web R2 (IIS7.5)
- Dual Xeon 2.8GHz CPUs
- 4GB RAM
JVM Config (same on "sick" and "good" servers):
- Initial and Max heap: 1536
-server -Xss10m -Dsun.io.useCanonCaches=false -XX:PermSize=192m  -XX:MaxPermSize=256m -XX:+UseParNewGC -Xincgc -Xbatch -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -Dcoldfusion.dotnet.disableautoconversion=true
What I believe a "healthy" server graph should look like (from "good" server):
And the "sick" server graph looks like this:

@AmericanWebDesign, I would concur with BKBK (in his subsequent reply) that a more reasonable explanation for what you’re seeing (in the growth of heap) is something using and holding memory, which is not unusual for the shared variables scopes: session, application, and/or server. And the most common is sessions.
If that’s enough to get you going, great. But I suspect most people need a little more info. If this matter were easy and straightforward, it could be solved in a tweet, but it’s not, so it can’t.
Following are some more thoughts, addressing some of your concerns and hopefully pointing you in some new directions to find resolution. (I help people do it all the time, so the good news is that it can be done, and answers are out there for you.)
Tracking Session Counts
First, as for the observation we’re making about the potential impact of sessions, you may be inclined to say “but I don’t put that much in the session scope”. The real question to start with, though, is “how many sessions do you have”, especially when memory use is high like that (which may be different than how many you have right now). I’ve helped many people solve such problems when we found they had tens or hundreds of thousands of sessions.  How can you tell?
a) Well, if you were on CF Enterprise, you could look at the Server Monitor. But since you’re not, you have a couple of choices.
b) First, any CF shop could use a free tool called ServerStats, from Mark Lynch, which uses the undocumented servicefactory objects in CF to report a count of sessions, overall and per application, within an instance. Get it here: http://www.learnosity.com/techblog/index.cfm/2006/11/9/Hacking-CFMX--pulling-it-all-togeth er-serverStats . You just drop the files (within the zip) into a web-accessible directory and run the one CFM page to get the answer instantly.
c) Since you mention using FusionReactor 4.0.9, here’s another option: those using FR 4 (or 4.5, a free update for you since you’re on FR 4) can use its available (but separately installed) FusionReactor Extensions for CF, a free plugin (for FR, at http://www.fusion-reactor.com/fr/plugins/frec.cfm). It causes FR to grab that session count (among many other really useful things about CF) to log it every 5 seconds, which can be amazingly helpful. And yes, FREC can grab that info whether one is on CF Standard or Enterprise.
And let’s say you find you do have tens of thousands of sessions (or more). You may wonder, “how does that happen?“ The most common explanation is spiders and bots hitting your site (from legit or unexpected search engines and others). Some of these visit your site perhaps daily to gather up the content of all the pages of your site, crawling through every page. Each such page hit will create a new session. For more on why and how (and some mitigation), see:
http://www.carehart.org/blog/client/index.cfm/2006/10/4/bots_and_spiders_and_poor_CF_perfo rmance
About “high memory”
All that said, I’d not necessarily conclude so readily that your “bad” memory graph is “bad”. It could just be “different”.
Indeed, you say you plan to “look for sudden jumps in memory usage“, but if you look at your “bad” graph, it simply builds very slowly. I’d think this supports the notion that BKBK and I are asserting: that this is not some one request that “goes crazy” and uses lots of memory, but instead is the “death by a thousand cuts” as memory use builds slowly.  Even then, I’d not jump at a concern that “memory was high”.
What really matters, when memory is “high” is whether you (or the JVM) can do a GC (garbage collection) to recover some (or perhaps much) of that “high, used memory”. Because it’s possible that while it “was” in use in the past (as the graph shows), it might no longer be “in use” at the moment . 
Since you have FR, you can use its “System Metrics page” to do a GC, using the trash can in the top left corner of the top right-most memory graph. (Those with the CFSM can do a GC on its “Memory Usage Summary” page, and SeeFusion users can do it on its front page.)
If you do a GC, and memory drops q lot, then you had memory that “had been” but no longer ”still was” in use, and so the high memory shown was not a problem. And the JVM can sometimes be lazy (because it’s busy) about getting to doing a GC, so this is not that unusual. (That said, I see you have added the Xincgc arg to your JVM. Do you realize that tells the JVM not to do incremental GCs? Do you really want that? I understand that people trade jvm args like baseball cards, trying to solve problems for each other, but I’d argue that’s not the place to start. In fact, rarely do I find myself that any new JVM args are needed to solve most problems.)
(Speaking of which, why did you set the – xss value? And do you know if you were raising or lowering it form the default?)
Are you really getting “outofmemory” errors?
But certainly, if you do hit a problem where (as you say) you find requests hanging, etc., then you will want to get to the bottom of that. And if indeed you are getting “outofmemory” problems, you need to solve those. To confirm if that’s the case, you’ll really want to look at the CF logs (specifically the console or “out” logs). For more on finding those logs, as well as a general discussion of memory issues  (understanding/resolving them), see:
http://www.carehart.org/blog/client/index.cfm/2010/11/3/when_memory_problems_arent_what_th ey_seem_part_1
This is the first of a planned series of blog entries (which I’ve not yet finished) on memory issues which you may find additionally helpful.
But I’ll note that you could have other explanations for “hanging requests” which may not necessarily be related to memory.
Are you really getting “queued” requests?
You also say that “the service will start to queue requests and eventually stop processing them all together”. I’m curious: do you really mean “queuing”, in the sense of watching something in CF that tells you that? You can find a count of queued requests, with tools like CFSTAT, jrun metrics, the CF Server Monitor, or again FREC. Are you seeing one of those? Or do you just mean that you find that requests no longer run?
I address matters related to requests hanging and some ways to address them in another entries:
http://www.carehart.org/blog/client/index.cfm/2010/10/15/Lies_damned_lies_and_CF_timeouts
http://www.carehart.org/blog/client/index.cfm/2009/6/24/easier_thread_dumps
Other server differences
You presented us a discussion of two servers, but you’ve left us in the dark on potential differences between them. First, you showed the specs for the “sick” server, but not the “good” one. Should we assume perhaps you mean that they are identical, like you said the JVM.config is?
Also, is there any difference in the pattern of traffic (and/or the sites themselves) on the two servers? If they differ, then that could be where the explanation lies. Perhaps the sites on one are more inclined to be visited often by search engine spiders and bots (if they sites are more popular or just have become well known to search engines). There are still other potential differences that could explain things, but these are all enough to hopefully get you started.
I do hope that this is helpful. I know it’s a lot to take in. Again, if it was easier to understand and explain, there wouldn’t be so much confusion. I do realize that many don’t like to read long emails (let alone write them), which only exacerbates the problem. Since all I do each day is help people resolve such problems (as an independent consultant, more at carehart.org/consulting), I like to share this info when I can (and when I have time to elaborate like this), especially when I think it may help someone facing these (very common) challenges.
Let us know if it helps or raises more questions. :-)
/charlie

Similar Messages

  • Never owned a Mac, thinking of buying a Mac Pro, could use some advice...

    Hey guys,
    I know this was a lot to read, but I sincerely hope someone will take the time to answer my questions:
    As the title of my post implies I've never owned a Mac in my life. I've always built my own desktops and usually gone to HP or Dell for my laptops. I'm approaching that time again where my custom-built desktop is looking outdated and I'm getting the upgrade itch. I'm looking at all the parts I need to order to build a computer and I can't help but think I'm older now with a full-time job and a one year old daughter in the house. Do I really want to go through the hassle of building a desktop from scratch again? Not really. So I started evaluating things a bit. As I get older I’m really just getting sick and tired of Microsoft’s antics (Vista was a huge disappointment for me) so I decided this could be the year for me to take the Mac plunge.
    Now I’m an IT guy, so I have a pretty atypical setup at home. I’m currently running both Windows and Linux on all my computers. Rather than dual boot or use virtualization software I have a pretty intricate system in which I use a product called Acronis Trueimage to experiment with operating systems. What I do is perform a a clean install on an operating system, tweak it as needed for security and to use resources on my LAN than back up the customized OS install to a server a an image file. I have pre-built images for XP, Vista, Ubuntu and OpenSuSE that I can roll out to one of my machines in an average of 15 minutes whenever I get the urge to switch operating systems. I also serve all my data off a NAS box, so since data and OS are kept separate on the network I don’t have to worry about erasing something when I swap between Linux and Windows (as loading an image literally destroys the previous OS install).
    So you can see I’m pretty highly specialized. I even have things down to the point to where I have custom images for specific purposes. For instance I have one XP image customized for development, one XP image customized for gaming, etc. Naturally if I got the Mac Pro I’d like to have the freedom to create a similar set of custom OS deployment images (Windows, Linux and OSX) for it as well. In researching the Mac Pro I have some concerns my current system might not work if I go that route. Am I correct in assuming that in order to run an alternative operating system on a Mac I’ll have to run boot camp or something like it? Or upon unboxing my Mac and tweaking Leopard will I be able to use disk imaging software to make a backup image of my preinstalled Leopard hard drive and then do a clean install of Windows XP or Ubuntu and set it up to function like a PC? I guess I’m asking if it’s possible (now that Macs are Intel-based) to run Windows or Linux exclusively on the Mac hardware?
    Also I have some concerns about the proprietary nature of the Mac platform. From what I can gather in my research it seems the hardware is pretty locked in. One area that has me really concerned is gaming. I pretty much use Ubuntu exclusively at home for productivity and web surfing. However I still like to load that XP image every now and then to play some games on the LAN with my buddies. I’m not a fan of virtualizing for gaming because of the obvious performance hit you take, so I’d have to be able to run Windows XP free and clear. Also I checked Nvidia’s site and I see no OSX drivers listed there for their cards. Under the Windows platform they are always releasing driver updates to squeeze more game performance out of your card. What if I want to upgrade my video card? How do drivers work on OSX? Does Apple just integrate drivers for just a few specific video cards into the OS? Will I be stuck only able to pick from a handful of video cards approved by Apple?
    Thanks in advance to anyone who can offer advice!
    Message was edited by: ZeusABJ

    Hi Zeus
    I may be able to answer some of your questions. And sorry in advance if this sounds like yet another of those "religious conversion" stories
    I'm a software developer/architect, mostly doing Microsoft .NET/C#/Web Services coding. I'd been a loyal Microsoft guy since I started on the original IBM PC back in the 80's. Like a lot of people (or so it seems) I just got fed up with Microsoft's high-handed and self-important ways. More importantly, the company always seemed to be lagging behind technically. Looking at beta versions of Vista did not bode well for the future - it just seemed awful. When Vista came out it it was the last straw - I just could not get enthusiastic about this bloated, slow, mess of an operating system. I really hated it. Still do. Even with a top-spec machine, Vista didn't run in the snappy, responsive way it I thought it should. Nothing seemed well thought out.. yuck!
    Then, by chance, I was staying for a few days with somebody who had a Mac. Now, for years and years I not even considered Macs as remotely serious machines. My only experience of them was in the late 80's when somebody at work had one. He took delight in pushing a floppy disc into the machine so that it would respond "Ah, it's so big!". Great, just a toy. Not for serious programming work. So, encountering Mac OS X Tiger on my friend's iMac was something of a shock. It was so responsive, clean and elegant. When you turned it on it only took about 30 seconds or so for the thing to be ready for use, etc, etc.
    Long story short, I bought an iMac, then a newer, bigger, faster iMac, then a MacBook Pro and now I have a Mac Pro. I still have to work with Windows to do my .NET-related day job. But 95% of the time I work on the Mac using various VMWare virtual machines. I can switch between Windows Server 2008, Windows Server 2003 and Windows XP in a few seconds and still be working in a Mac environment. And the performance of running Windows inside VMWare is even better than on my dedicated top-spec Windows laptop! I have a selection of virtual machines to choose from and, because these virtual machines are just files, I can back them up, revert to saved copies, etc. I've tried Bootcamp but it's much less convenient and performance inside the virtual machines is never an issue (although I don't do any gaming). So, you could keep virtual machines on your NAS box or local Mac hard drive.
    With regard to graphics drives, etc. I've never had any problems whatever in this respect. For example, when I installed Windows XP on VMWare it automatically recognised all my hardware (including some obscure audio interfaces, USB-based MIDI interfaces, etc.) and made it available. I must admit that when I was new to the Mac I expected to have driver issues, but never have had... So, my guess is that you'll be able to run all your Windows and Linux distros on the Mac without too many problems.
    You mention Apple's hardware as being "locked-in". I don't think that's the case. Certainly the consumer Mac models like the iMac can't be upgraded (by you or me) internally, expect for memory. The Mac Pro though is very easy to upgrade - though there may be some limitations with regard graphics cards.
    Re your questions about graphics card drivers. Yes, these come with OS X in just the same as as with Windows. Because I've also used the card that comes "with the box" this has not been an issue for me. However, unless you get a Mac Pro you can't swap-in your existing graphics card. And even then I think you may find restrictions. However, other, more knowledgeable Mac users on this forum may have other thoughts.
    Overall though, the experience of using the Mac in terms of software is very much the reverse of Windows - the OS is very open and well documented. It really is an IT person's dream machine - so much to fiddle around with (particularly if you know anything about Unix!). Unlike Microsoft who charge a FORTUNE for their development tools, Apple give them to you for free. And very good they are too!
    Finally, one bit of advice. If you are considering buying a new Mac, join the Apple Developer Connection scheme as a Select member. It'll cost you around $400 to join but they give you a hardware discount for Apple-store purchased items that will save you a ton of $$$'s - absolutely definitely worth doing.
    Hope this helps (and good luck)!
    Russ

  • Easy to produce - Memory Leak in JVM Using thread

    I was just debugging the problem with our server and got this error (not from the original code, I reproduced it with small code)
    at java.lang.Thread.run(Unknown Source)
    java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Unknown Source)
    at SomeObject.resursiveThreadGeneratorMethod(ThreadRecursionLeak.java:12
    at ClientThread.run(ThreadRecursionLeak.java:27)
    it is just a simple program generating thread recursively with a lock on an object
    import java.lang.Runnable;
    import java.lang.Thread;
    //     <<Objec/Monitor Class>>
         class SomeObject{
              public synchronized void resursiveThreadGeneratorMethod(int threadNumber, int k){
                   if(k<=0)
                        return;
                   else{
                        System.out.println("Thread: "+threadNumber + "call number: "+k);
                        Thread thread=new Thread(new ClientThread(this));
                        thread.start();
                        resursiveThreadGeneratorMethod(threadNumber,k-1);
    //     <<Thread Class>>
         class ClientThread implements Runnable{
              SomeObject someObject=null;
              public static int threadNumber;
              public ClientThread(SomeObject someObject){
                   this.someObject=someObject;
                   threadNumber++;
              public void run(){
                   someObject.resursiveThreadGeneratorMethod(this.threadNumber,10);
    //     <<Driver Class>>
         public class ThreadRecursionLeak{
              public static void main(String [] args){
                   SomeObject someObject=new SomeObject();
                   Thread thread=new Thread(new ClientThread(someObject));
                   thread.start();
    is there any way I can monitor JVM memory status (programatically), kill those threads leading to memory leak and send notification to the system admin.
    We run JVM 1.4 on the server and need to address this issue as we do not have control over the code that can be submitted to the server, we just do some checks and then let it run on the servers.
    Our main requirement is to keep JVM alive and kill all those code and report them.
    Message was edited by:
    rajanikant_malviya

    You can monitor the JVM with the
    [url=http://java.sun.com/j2se/1.4.2/docs/guide/jvmpi/i
    ndex.html]JVMPI if you're using the Sun JVM.This is native code that basically gets
    notified anytime the JVM does something
    interesting.
    However, you're going to have a very difficult time
    catching code that does what the code you show does.
    I'm not sure I understand your environment - you
    allow people to submit code and you run it? Are you
    running it in the same JVM as your server? That
    seems like a huge issue. A simple System.exit()
    code will take down your server.
    Let us know some more details.
    We are actually having a portal through witch users can submit their code, witch are basically utility codes for different operations teams.
    we then provide a way to schedule them.
    At the background, we are having 6 (Win) servers where at each server we are having 20 to 25 users on different ports (managed by our application) running there own JVMs. When a schedule is met we just invoke a servlet (on any free port) and pass code id (stored in DB). And this servlet is responsible for compilation and exicution of the code (We just use Runtime to fork this new process).
    I don't know, but is there any way through witch I can monitor this process and restrict to generate threads recursively???

  • Finding Memory leaks in C using Visual Studio 2013

    I am using Visual Studio 2013, and taking a course in C programming and we started
    talking about memory bugs detaction, in particular memory leaks, and how to detect them using Valgrind on Linux.
    I want to know if there is a way to detect such memory leaks using VS 2013. I tried searching online but it just leads to lots of articles and blogs and msdn posts and blogs with lots of words like dump files, and analyzing them, etc which is weird
    because:
    1) It sounds so complex, convoluted and unintuitive it is actually hard to comprehend it.
    2) The main reason this is weird is due to the fact that VS is the most advanced IDE around and Microsoft spends so much money on in, yet from what I have read it seems that there is no simple way to use VS to detect memory leaks
    - certainly no way that's as simple as Valgrind where I only have to compile the program and run the command valgrind -leaks-check=yes ProgramName
    and it simply prints to me all location it thinks there is a memory leak and describes the error (like not freeing memory after allocating it with malloc hence having "dead" memory after the program finishes, or accessing memory that's out of
    the array bounds)                                                                                                                                                               
    So my question is how to use VS 2013 in order to achieve the same results and to find out First in high level if there are memory leaks in the program, and Second - to detect in a simple manner where those leaks are- preferably without involving dump files
    (not that I know how to use them anyway in VS).

    Hi MicrosoftLaw,
    Thanks for your post.
    Based on your issue, if you want to check if there are memory leaks in the C program from this VS2013. I suggest you could try to find Memory Leaks Using the CRT Library, for more information:
    https://msdn.microsoft.com/en-us/library/x98tx3cf.aspx?f=255&MSPPError=-2147217396
    In addition, I find a similar thread about this issue, please you refer the Dusty's suggestion to check this issue.
    http://stackoverflow.com/questions/45627/how-do-you-detect-avoid-memory-leaks-in-your-unmanaged-code
    I did some research about this issue, I found that the Visual Leak Detector extension tool is a free, robust, open-source memory leak detection system for Visual C++. So if possible, I suggest you could try to use the Visual Leak Detector extension
    tool to find the memory leak for Visual C/ C++ program.
    https://visualstudiogallery.msdn.microsoft.com/7c40a5d8-dd35-4019-a2af-cb1403f5939c
    However, if you have any issue about how to use this Visual Leak Detector extension tool to find the memory leak for C program. I suggest you could directly to write a review to this REVIEW tab in Visual Leak Detector site.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I got the iPhone 4S and I use google calendar and when the Sprint salesperson set up my phone only 2 months of my calendar went on my phone. How do I get my whole calendar to sync on my phone?

    I got the iPhone 4s and i use google calendar and when the Sprint sales person set up my phone, only 2 months showed up on my iPhone. How do I sync all of google calendar to my iPhone!

    Settings/Mail,Contacts,Calendar - there's a setting for how far back to sync calendars.

  • I just got a MacBook Pro and I used Home Sharing to transfer my library from my PC. However, my PC's battery died in the middle of the process so only half of my music was transferred. The sharing option no longer shows up on the left.  How do I fix this?

    I just got a MacBook Pro and I used Home Sharing to transfer my library from my PC. However, my PC's battery died in the middle of the process so only half of my music was transferred. The sharing option no longer shows up on the left.  Do I need to start completely over and delete the content in my new library to prevent duplicates or is there a way to continue the process?

    I just got a MacBook Pro and I used Home Sharing to transfer my library from my PC. However, my PC's battery died in the middle of the process so only half of my music was transferred. The sharing option no longer shows up on the left.  Do I need to start completely over and delete the content in my new library to prevent duplicates or is there a way to continue the process?

  • LV memory leak - How to use windows API SetProcessWorkingSetSize (from Kernel32.dll)

    Hi fellow LV'ers
    Okay - this is a bit tricky, but i'll try and explain the problem, then ask for the solution, because it may be that someone knows a better way to deal with this.. might get a bit long, sorry - if a solution comes up this will enable all of us to make more memory efficient LV code so please read on..
    Here is the deal:
    When building even a very simple LV executable, looking at the windows task manager will yield a rather large amount of memory allocated for such a small program - and the only way to free this up is by physically clicking the windows minimize button, then suddenly the amount drops to only a few MB and upon maximizing the window again the memory consumption will increase somewhat again, but for a simple VI build to an exe this move may change the consumption from +70MB to less than 15 MB.. This is irregardless of the code you put in the VI, so no coding example in this post as it is how LV works - you can even test it with the development environment - look at the task mgr and check LabVIEW's memory consumption, minimze ALL open NI windows incl project explorer etc, and you will see a significant decrease in memory usage even after maximizing again.. This has annoyed me since day one, but since RAM is a near zero cost these days it is not something I stay awake at night to think about.. However - I have moved into the "publish to web" tools now, wanting to do a remote monitoring part for my application for my customers to experience increased usability from the software i sell them..
    All is well, publishing is really easy (i use the monitor function, NOT the embeded, as customers need not have Labview RunTimeEngine installed, because they might look at it from a non RTE supported platform such as a mobilephone web browser)
    Everything is working fine also for the build application. However - I have noticed that once users start to remote monitor the running application - memory consumption of the running LV application starts to increase - and it keeps doing so - to such an extend that you can drain the computer complete and run off the cliff with a windows error... This is off course not very productive for me, being specialized in measurement applications that usually runs for a long period of time - I initially thought that I had done some poor programming in the VI used to display on the webpage - but it turns out that I can reproduce this behaviour with a simple boolean on an empty front panel..
    NI support has been informed, and they admit there is a problem, but so far solutions from them has been a bit too exotic for my taste, and thus I'm seeking the help of fellow LV programmers...
    You see - The method to solve the increasing memory consumption, is the exact same as mentioned above..minimize the application running with the "minimize" button and all memory will be freed, as soon as you maximize the application and users are viewing it remotely, the memory usage raises again, and history repeats... As previously mentioned, minimizing the window via normal LV calls to property nodes does not yield the same result, nor does a request deallocation of a VI(When you profile a project, there are no VI's increasing in memory, it is the LV process it self doing it) 
    After many many hours googling I stumbled upon this:
    http://support.microsoft.com/?kbid=293215
    I believe trimming the process with SetProcessWorkingSetSize would solve this problem, and now I would really like to be able to do this in my program, so that users are not forced to minimize the program every X hour depending on their system size...
    However - I have absolutely NO experience in calling windows API from LV, i need someone with that knowledge to provide an example of how to call this.. I've looked at examples on how to do calls to windows API - there is an example in this forum with some llb's in it, and I have gained a fair understanding of how parameters are passed between the calls, but none of those include the "hProcess" handle that is apparently needed for this specific winAPI call to work - Anyone in this forum with the knowledge on how to obtain this handle from a VI, if at all possible, and could provide an example VI for me to use - or even better , someone with the knowledge of how to do this within LV it self??
    Your help is much appreciated
    Best Regards
    Jacob
    LV8.6.1 patch something
    Win XP 
    Solved!
    Go to Solution.

    Hi Enrico
    Finally I can give something to the community that has given me so much  :-)
    The "official" statement is that "yes we know it is a problem".. Not sure what that will do to the future.. 
    I have the problem on 8.6.1 as well  - and in fact it is a general LV problem, that I first time reported to NI with LV8.2 as I was pissed by the fact that even the smallest exe file would consume + 50MB of memory until you manually minimized the window. Well - thanks to the feedback from Cosmin I seem to have solved the problem.
    I most warn that having started to "empty process" once in a while has led to occasional program crashes in the lethal "app.exe performed an illegal action and is closed" windows dialog - however what I did was to move the webserver to a seperate exe file and then communicate the data that I want to use via datasocket in a cluster.. It works like a charm and I simply stall the single thread that the webserver is running when ever the empty process is called and I have not seen a crash since then.. (the initial implementation was done in the main app with 4 parallel loops running, and I guess that was a disaster waiting to happen)
    Either way - what I have done is made a VI that at a user defined interval calls the empty process, simply by getting the .exe name from the task manager of the calling program - it is simple and very effective. I call it every 5 minutes - needless to say that flushing too often will most likely kill performance of the system. I have not noticed problems with VM - are you sure you are not storing large arrays or moving around copies of data not used frequently?
    For future reference to this forum, it is attached here including the .dll required to call - it is a LV8.6.1 file as I have not had the time to yet again test every single function of my program for new problems that could occur with upgrading to LV2009 
    I hope this solves your problem..
    best regards
    Jacob
    www.10EaZy.com 
    Attachments:
    EmptyProcess.zip ‏32 KB

  • Firefox has a memory leak and I need to update it, but I want to keep 3.5 because I don't like how the newest version of Firefox is set up.

    My computer is running low on RAM, and when I look at what processes are using the most memory, firefox is the number one using between 28,000 to 93,000k, so I'm guessing that it has a memory leak.
    And because of that memory leak I have to update firefox, however I really dislike the newest version of firefox and I'd prefer to stick with the version I have, which is 3.5.

    Often the memory problems are not just from Firefox in isolation, but partly relating to all the extensions available for it and then the videos and animations it runs on media rich sites.
    The first thing to do is to upgrade to firefox 3.6 which is at least a supported version (Maybe not for much longer)
    * see [[updating firefox]]
    Next version after 3.6 is 4, you should avoid that, it did have some memory problems, that were worse than 3,6 and firefox 4 is no longer secure or supported.
    The techies at Firefox have been working on memory problems recently and have made many improvements, but some of these improvements are only seen in the trial versions of Firefox.
    I would in fact suggest you upgrade to Firefox 5 the current release version (soon to be replaced with Firefox 6)
    I am able to run Firefox v3.6 to v8 on legacy XPs with less than 1GB RAM. Firefox in itself is not necessarily very demanding in terms of RAM. I am not sure what the figures are you are quoting, or whether they are high. ( Note 1Gb is in the order of 1 000 000 k )
    As for not liking the set-up of new versions of Firefox, there is quite abit that can be changed, maybe you would be able to configure it more to your liking with little effort.

  • Memory leak and char[] ?

    Hello all,
    I'm not sure whether this post should be here or in WebLogic section, so correct me if I'm wrong.
    I'm working on JDeveloper 11.1.1.3 while deployments are made on standalone WebLogic 10.3.3. This thing occurred in previous versions also.
    With every deployment WebLogic increases it's used memory until the famous PermGen space error, which is after about 5-6 deployments.
    I'm doing my best to understand how to use memleak detection tools. I've switched JDev and WL from Sun jdk which was used before to JRockit, same thing happens. Both JDev's memory profiler and JRockit mission control show something that I really do not understand. char[] uses around 30% of heap space and keeps growing with deployments, next is String with 8%. I never use char in app.
    Am I looking at the wrong thing? Is it normal for char[] to increase on WebLogic on deployments? Does anyone know how to check other things and what to check? Someone on other forums mentioned it would be useful to check if ApplicationContext keeps initializing over again on deployments. Does anyone know how to check this?
    One more thing, I have successfully deployed app on Tomcat, and Tomcat said there is a memory leak in app, but could not tell anything specific.
    I'm kinda lost in this :(

    It is normal for the PermGen space of the Sun's JVM to get filled after several re-deployments. PermGen stands for "permanent generational". This space is used by classes that is unlikely to need to be garbage-collected, so they are placed in this memory space that is never garbage-collected (for example, the Class instances). When you redeploy an application, a new class loader instance is used and it instantiates new Class instances that fill up the PermGen space. But why this happens on JRockit either, I could not explain.
    We have experienced memory leaks related to classes and components that use native memory. For example, we have had significant memory leak when using Oracle's JDBC OCI driver. We were not able to solve this problem, so we switched to JDBC Thin driver (which is very performant and stable today comparing to some years ago). If you are using Oracle JRockit, you can monitor the overall memory usage by the following JRockit command executed at OS command line:
    jrcmd <jrockit_pid> print_memusage>where <jrockit_pid> should be replaced by the JVM process ID.
    If you suspect existence of native memory leaks, then have a look at the article Thanks for the memory for explanations about how Java uses native memory.
    Dimitar

  • Memory leak when I use function with bstr_t type

    Hello,
    I use Visual C++ 6 and TestStand 3.1.
    I use the tool: Purify from Rational Instruments to detect memory leak in my code.
    When I use in my code, functions from the TestStand API using bstr_t types: GetValString, GetType... memory leaks appear.
    Do you have an idea to solve this problem?
    Thanks

    Breizh,
    Etes vous sur que le problèmes soit lié au type bstr_r ?
    Pouvez vous me faire parvenir un exemple de code mettant en oeuvre la fuite mémoire?
    Raphaël T.
    NI FRANCE
    Cordialement,
    Raphael T

  • Firefox 4 still suffering from a serious memory leak, ends up using 2GB of RAM on 5 tabs and a few plugins?!!

    Why does even Firefox 4, which was supposed to have this issue fixed by now, still suffer from memory leaks?
    I opened up 4-5 tabs, enabled Firebug to tweak a few pages, and an hour later Firefox usage is up to 2GB of RAM?
    What a...?!
    Now, seriously, if you run to suggest that it is most likely due to add-ons and that I should disable them all and start Firefox in safe mode, let me just cut you off right there and ask you this - out of millions of people who downloaded this browser, who the hell uses it without any plugins and/or in safe mode?
    If you're gonna make a browser, make it so that it's lean and free of these issues to begin with, out of the box AND in case an addon or something else is added to it - can't they protect the core files and libraries from being victims to this, in case the addons are to blame?
    And in case it's a Firefox issue to start off with, seriously, can you get a dedicated developer to look into this alone and get it fixed, once and for all?

    I have six tabs open and generally have 3-5. It's been sitting here since last night. I'm using 296Mb ram which is high for me on Windows. My wife and son both use FF4 also and, having just checked, are between 210 and 268Mb respectively.
    No one I know ever complains about high memory usage in FF4 and neither have I experienced it since FF2.5 when memory leaks any user would notice were all fixed.
    So my advice is the same. If your add-ons aren't causing you problems, fix your system.

  • Yosemite and Mail massive memory leak and excessive CPU usage

    I've just installed Yosemite and upgraded to 10.10.2 via the AppStore. Now I have a problem with Mail sucking up all the CPU (>106% !) and memory (>8Gb and rising while doing nothing). Everything runs fine when I quit Mail. Very disturbing behaviour!
    I've tried several suggestions found elsewhere on the board here, such as turning off and even removing all Mail plug-ins including SpamSieve, but without positive results. I've tried un-selecting 'Store draft msgs on server', as well as the option for junk and sent msgs. but again without any difference. Going Offline within Mail also makes no difference to its memory hogging or CPU usage.
    I notice this is an issue that's been around since last year (wish I'd known that before upgrading to Yosemite today) and I am just completely flabbergasted that it still exists. Would've thought Apple'd have fixed it in the first but certainly in the second incremental OSX Yosemite release.
    Is there anything else I could try that's proven to be effective in stopping Mail's massive memory leak?

    Okay, I've run Disk Util and restarted. Seems to have made a little bit of a difference to the RAM gobbling in that it appears to be going at a slower rate, but it's still up at around the 45Gb after an hour. Here's the EtreCheck report in the hope that it helps.
    EtreCheck version: 2.1.6 (109)
    Report generated 28 January 2015 4:38:22 pm AEDT
    Download EtreCheck from http://etresoft.com/etrecheck
    Click the [Support] links for help with non-Apple products.
    Click the [Details] links for more information about that line.
    Click the [Adware] links for help removing adware.
    Hardware Information: ℹ️
        MacBook Pro (Retina, 15-inch, Mid 2014) (Technical Specifications)
        MacBook Pro - model: MacBookPro11,3
        1 2.5 GHz Intel Core i7 CPU: 4-core
        16 GB RAM Not upgradeable
            BANK 0/DIMM0
                8 GB DDR3 1600 MHz ok
            BANK 1/DIMM0
                8 GB DDR3 1600 MHz ok
        Bluetooth: Good - Handoff/Airdrop2 supported
        Wireless:  en0: 802.11 a/b/g/n/ac
        Battery Health: Normal - Cycle count 16
    Video Information: ℹ️
        Intel Iris Pro
            Color LCD spdisplays_2880x1800Retina
        NVIDIA GeForce GT 750M - VRAM: 2048 MB
    System Software: ℹ️
        OS X 10.10.2 (14C109) - Time since boot: 1:1:19
    Disk Information: ℹ️
        APPLE SSD SM0512F disk0 : (500.28 GB)
            EFI (disk0s1) <not mounted> : 210 MB
            Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
            Macintosh HD (disk1) / : 499.05 GB (413.24 GB free)
                Core Storage: disk0s2 499.42 GB Online
    USB Information: ℹ️
        Apple Internal Memory Card Reader
        Asmedia ASM107x
            Asmedia ASM107x
        Apple Inc. Apple Internal Keyboard / Trackpad
        Apple Inc. BRCM20702 Hub
            Apple Inc. Bluetooth USB Host Controller
        Asmedia ASM107x
            Asmedia ASM107x
                Logitech Logitech USB Optical Mouse
                Apple, Inc. Keyboard Hub
                    Apple, Inc Apple Keyboard
    Thunderbolt Information: ℹ️
        Apple Inc. thunderbolt_bus
    Configuration files: ℹ️
        /etc/hosts - Count: 2
    Gatekeeper: ℹ️
        Mac App Store and identified developers
    Kernel Extensions: ℹ️
            /Applications/DiskWarrior.app
        [not loaded]    com.alsoft.Preview (5 - SDK 10.5) [Support]
            /Applications/ibVPN.app
        [not loaded]    net.tunnelblick.tap (1.0) [Support]
        [not loaded]    net.tunnelblick.tun (1.0) [Support]
            /Library/Extensions
        [loaded]    at.obdev.nke.LittleSnitch (4231 - SDK 10.8) [Support]
        [loaded]    com.sophos.kext.sav (9.2.50 - SDK 10.8) [Support]
        [loaded]    com.sophos.nke.swi (9.2.50 - SDK 10.8) [Support]
        [loaded]    jp.plentycom.driver.SteerMouse (4.2.2 - SDK 10.6) [Support]
    Problem System Launch Agents: ℹ️
        [killed]    com.apple.AirPlayUIAgent.plist
        [killed]    com.apple.CallHistoryPluginHelper.plist
        [killed]    com.apple.CallHistorySyncHelper.plist
        [killed]    com.apple.cloudd.plist
        [killed]    com.apple.icloud.fmfd.plist
        [killed]    com.apple.nsurlsessiond.plist
        [killed]    com.apple.pluginkit.pkd.plist
        [killed]    com.apple.security.cloudkeychainproxy.plist
        [killed]    com.apple.spindump_agent.plist
        [killed]    com.apple.telephonyutilities.callservicesd.plist
        10 processes killed due to memory pressure
    Problem System Launch Daemons: ℹ️
        [killed]    com.apple.awdd.plist
        [killed]    com.apple.ctkd.plist
        [killed]    com.apple.icloud.findmydeviced.plist
        [killed]    com.apple.ifdreader.plist
        [killed]    com.apple.nehelper.plist
        [killed]    com.apple.nsurlsessiond.plist
        [killed]    com.apple.softwareupdated.plist
        [killed]    com.apple.wdhelper.plist
        8 processes killed due to memory pressure
    Launch Agents: ℹ️
        [running]    at.obdev.LittleSnitchUIAgent.plist [Support]
        [not loaded]    com.adobe.AAM.Updater-1.0.plist [Support]
        [running]    com.adobe.AdobeCreativeCloud.plist [Support]
        [running]    com.sophos.uiserver.plist [Support]
    Launch Daemons: ℹ️
        [running]    at.obdev.littlesnitchd.plist [Support]
        [running]    com.adobe.adobeupdatedaemon.plist [Support]
        [loaded]    com.adobe.fpsaud.plist [Support]
        [loaded]    com.microsoft.office.licensing.helper.plist [Support]
        [running]    com.sophos.common.servicemanager.plist [Support]
        [running]    com.synium.cleanappdaemon.plist [Support]
        [running]    com.syniumsoftware.CleanAppDaemon.plist [Support]
    User Launch Agents: ℹ️
        [loaded]    com.adobe.ARM.[...].plist [Support]
        [running]    com.c-command.SpamSieve.LaunchAgent.plist [Support]
        [loaded]    com.google.keystone.agent.plist [Support]
        [not loaded]    com.linotype.FontFolderProtector.plist [Support]
        [failed]    com.wondershare.mobilegodaemon.plist [Support]
        [not loaded]    info.lokiware.attachmenttamer.cleanup.plist [Support]
        [invalid?]    info.lokiware.attachmenttamer.setupagent.plist [Support]
    User Login Items: ℹ️
        Letter Opener Updater    Application  (/Library/Mail/Bundles/Letter Opener.mailbundle/Contents/Resources/Software Update.app)
        iTunesHelper    Application  (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
        Default Folder X Helper    Application Hidden (/Users/[redacted]/Library/PreferencePanes/Default Folder X.prefPane/Contents/Resources/Default Folder X Helper.app)
        FontExplorer X Pro    Application Hidden (/Applications/FontExplorer X Pro.app)
        Calendar    Application Hidden (/Applications/Calendar.app)
        SteerMouse Manager    Application  (/Applications/Utilities/SteerMouse.app/Contents/MacOS/SteerMouse Manager.app)
        Mail    Application Hidden (/Applications/Mail.app)
        Android File Transfer Agent    Application  (/Users/[redacted]/Library/Application Support/Google/Android File Transfer/Android File Transfer Agent.app)
        DiskWarriorStarter    Application  (/Applications/DiskWarrior.app/Contents/Helpers/DiskWarriorStarter.app)
        finderpop-daemon    Application  (/Users/[redacted]/Library/PreferencePanes/FinderPop.prefPane/Contents/Resource s/finderpop-daemon.app)
        XtraFinder    Application Hidden (/Applications/XtraFinder.app)
    Internet Plug-ins: ℹ️
        AdobeAAMDetect: Version: AdobeAAMDetect 2.0.0.0 - SDK 10.7 [Support]
        FlashPlayer-10.6: Version: 16.0.0.296 - SDK 10.6 [Support]
        QuickTime Plugin: Version: 7.7.3
        AdobePDFViewerNPAPI: Version: 11.0.10 - SDK 10.6 [Support]
        AdobePDFViewer: Version: 11.0.10 - SDK 10.6 [Support]
        Flash Player: Version: 16.0.0.296 - SDK 10.6 [Support]
        Default Browser: Version: 600 - SDK 10.10
        SharePointBrowserPlugin: Version: 14.4.7 - SDK 10.6 [Support]
    User internet Plug-ins: ℹ️
        iGetter Plugin: Version: 2.9.3 [Support]
        iGetterScriptablePlugin: Version: 2.9.3 [Support]
    Safari Extensions: ℹ️
        1Password [Installed]
        iGetter Extension [Installed]
    3rd Party Preference Panes: ℹ️
        Default Folder X  [Support]
        FinderPop  [Support]
        FUSE for OS X (OSXFUSE)  [Support]
        SteerMouse  [Support]
    Time Machine: ℹ️
        Time Machine not configured!
    Top Processes by CPU: ℹ️
          105%    Mail
            3%    WindowServer
            2%    sysmond
            2%    Activity Monitor
            0%    fontd
    Top Processes by Memory: ℹ️
        4.10 GB    Mail
        103 MB    Finder
        86 MB    SophosScanD
        86 MB    InterCheck
        86 MB    WindowServer
    Virtual Memory Information: ℹ️
        84 MB    Free RAM
        2.92 GB    Active RAM
        2.87 GB    Inactive RAM
        2.76 GB    Wired RAM
        2.57 GB    Page-ins
        23 MB    Page-outs
    Diagnostics Information: ℹ️
        Jan 28, 2015, 03:37:41 PM    Self test - passed
        Jan 28, 2015, 02:49:01 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/Android File Transfer Agent_2015-01-28-144901_[redacted].crash
        Jan 28, 2015, 09:31:04 AM    /Library/Logs/DiagnosticReports/Mail_2015-01-28-093104_[redacted].cpu_resource. diag [Details]
        Jan 28, 2015, 07:39:17 AM    /Library/Logs/DiagnosticReports/AdobeCrashDaemon_2015-01-28-073917_[redacted].c rash
        Jan 27, 2015, 07:54:29 PM    /Library/Logs/DiagnosticReports/AdobeCrashDaemon_2015-01-27-195429_[redacted].c rash

  • HT201250 Can I make my iMac think it has more (HDD) memory (not RAM) by using disk utility and an external 500GB drive?

    I have a Macbook Pro and iMac which are both great. But my 500gb hard drive isn't big enough to backup my 320GB MB PRO
    I thought maybe I can attach my HDD to my iMac to give it more memory. Then backup to the iMac
    If this isn't possible, could I login as an iMac user on my macbook pro and just have a mini server using my iMac and MB PRO? (My sister and parents use the iMac as their primary computer, i use my MB Pro as mine, so they would have to be able to use the computer at the same time as me using my macbook)
    In otherwords, I just want to be able to back up wireleslly but still acces all my files on both computers offline.

    If you're talking about TIme Machine backup, it should be dleting as it goes but I agree you need more to run that effectively.
    One solution, instead of TM would be to make a bootable clone with either SuperDuper or CarbonCopy Cloner
    and use that as your backup solution until you get a disk large enough for TM.

  • External memory allocation and management using C / LabVIEW 8.20 poor scalability

    Hi,
    I have multiple C functions that I need to interface. I need
    to support numeric scalars, strings and booleans and 1-4 dimensional
    arrays of these. The programming problem I try to avoid is that I have
    multiple different functions in my DLLs that all take as an input or
    return all these datatypes. Now I can create a polymorphic interface
    for all these functions, but I end-up having about 100 interface VIs
    for each of my C function. This was still somehow acceptable in LabVIEW
    8.0 but in LabVIEW 8.2 all these polymorphic VIs in my LVOOP project
    gets read into memory at project open. So I have close to 1000 VIs read into memory when ever I open my project. It takes now about ten minutes to
    open the project and some 150 MB of memory is consumed instantly. I
    still need to expand my C interface library and LabVIEW doesn't simply
    scale up to meet the needs of my project anymore.
    I now
    reserve my LabVIEW datatypes using DSNewHandle and DSNewPtr functions.
    I then initialize the allocated memory blocks correctly and return the
    handles to LabVIEW. LabVIEW complier interprets Call Library Function
    Node terminals of my memory block as a specific data type.
    So
    what I thought was following. I don't want LabVIEW compiler to
    interpret the data type at compile time. What I want to do is to return
    a handle to the memory structure together with some metadata describing
    the data type. Then all of my many functions would return this kind of
    handle. Let's call this a data handle. Then I can later convert this
    handle into a real datatype either by typecasting it somehow or by
    passing it back to C code and expecting a certain type as a return.
    This way I can reduce the number of needed interface VIs close to 100
    which is still acceptable (i.e. LabVIEW 8.2 doesn't freeze).
    So
    I practically need a similar functionality as variant has. I cannot use
    variants, since I need to avoid making memory copies and when I convert
    to and from variant, my memory consumption increases to three fold. I
    handle arrays that consume almos all available memory and I cannot
    accept that memory is consumed ineffectively.
    The question is,
    can I use DSNewPtr and DSNewHandle functions to reserve a memory block
    but not to return a LabVIEW structure of that size. Does LabVIEW
    carbage collection automatically decide to dispose my block if I don't
    correctly return it from my C immediately but only later at next call
    to C code. Can I typecast a 1D U8 array to array of any dimensionality and any numeric data type without memory copy (i.e. does typecast work the way it works in C)?
    If I cannot find a solution with this LabVIEW 8.20 scalability issue, I have to really consider transferring our project from LabVIEW to some other development environent like C++ or some of the .NET languages.
    Regards,
    Tomi
    Tomi Maila

    I have to answer to myself since nobody else has yet answered me. I came up with one solution that relies on LabVIEW queues. Queues of different type are all referred the same way and can also be typecased from one type to another. This means that one can use single element queues as a kind of variant data type, which is quite safe. However, one copy of the data is made when you enqueue and dequeue the data.
    See the attached image for details.
    Tomi Maila
    Attachments:
    variant.PNG ‏9 KB

  • My Mdaughter got a ndew ipod and is missing some itunes she purchased.

    My daughter got a new ipod and can't find some of her recent purchases.  How can I find out what she has purchased and get them back?

    Hello, Annette.
    This forum is for questions about iTunes U, Apple's service for colleges and universities to post educational material in the iTunes Store. You'll be most likely to get help with this issue if you ask in the general iTunes forums.
    Regards.

Maybe you are looking for

  • Radiation emission from Yoga 13... actually feel it in my leg nearest it.

    Is anyone experiencing any elecromagnetic radiation (?) or other type of emission from a Yoga 13?    Something is being emitted from mine because as soon as I turn it on I feel the skin on my kegs start to develop a burning sensation.  I moved it off

  • Gnome panel launcher icon size

    Is there a way to make GNOME panel launcher icons smaller? (like in XFCE panels...) Or, is there any other type of launcher that can be used?

  • Documents Tables

    HI ALL Can any one clarify me in which tables the documents data is stored in Bex. We use documents for commentary. So can anyone say where this commentary data stores in BW system i.e in which tables does this store. Thanks Sunitha.

  • Why Save as Copy?

    I have 2 identical layered RGB images. I'm trying to save each as PNG files. One works fine and the other wants to save as a copy? Any ideas why? I've looked everywhere for a difference. It's messing up my droplet.

  • Installation of Sun Directory Server on Home PC - Domain name problem

    Hi! I would like to install SunONE directory server on my home PC but, I am unable to do so because one of the installation steps requires the fully qualified machine name. This is of format <hostname>.<domainname>. My home PC doesnot belong to any d