LINQPad 4.55.03 main process consumes > 1GB RAM over 72 hour period
I'm using LINQPad 4.55.03 Premium, and I leave LINQPad open as it's running on a virtual machine. I started LINQPad on 11-MAY-2015 and according to Task Manager the main process was consuming < 175MB private working set memory. Right now, 13-MAY-2015, it's using > 1.2GB private working set memory. There are four UserQuery processes that are using 10MB, 30MB, 52MB, and 280MB each. As a side note this Windows computer has 12GB RAM, and is currently using 6.4GB.
With the main process over 1GB memory, the LINQPad interface is very sluggish, to the point that it gets in the way of keystrokes. My only remedy is to close LINQPad and start it again thereby releasing the 1GB of memory. I don't remember when this behaviour started, perhaps about two months ago. Regrettably, I agreed to update LINQPad to a recent version at its prompting and I regret having done so.
Should I downgrade to an earlier version, or is there a new setting that I'm not aware of that will stop the runaway memory consumption?
With the main process over 1GB memory, the LINQPad interface is very sluggish, to the point that it gets in the way of keystrokes. My only remedy is to close LINQPad and start it again thereby releasing the 1GB of memory. I don't remember when this behaviour started, perhaps about two months ago. Regrettably, I agreed to update LINQPad to a recent version at its prompting and I regret having done so.
Should I downgrade to an earlier version, or is there a new setting that I'm not aware of that will stop the runaway memory consumption?
Comments
Thanks
So both these things fixed by turning it off.
This routine was deleting/truncating some data from a database and my original attempt was attempting to delete a master table before child table and so I cancelled the routine.
When I fixed my code and re-ran it, the routine stalled and timed out on a truncate table command. The only reason this could happen is if the table was locked and the only other process that could be doing so the supposed cancelled query.
When I killed this process id using task manager, the script ran immediately.
Hence it looks like the cancel button made it look like the query had stopped, whereas it was still running and taking up memory in the background causing a memory leak.
I didn't notice at the time, but I later discovered that there were two 'Your LINQPad Query' processes which were each using 1.6GB of memory and also around 25% CPU time.
This was on a machine using LinqPad 4.57.02
static List<object> _objects = new List<object>(); void Main() { for (int i = 0; i < 10 ; i++) _objects.Add (Enumerable.Range (0, 10000000).Select (x => x).ToArray()); }
After the first run, you'll see a LINQPad.UserQuery process using 400MB of memory. Run it twice more, and you'll get an OOM error - and you'll notice that the LINQPad.UserQuery process will disappear.
So, you are correct that I don't know for sure that the processes were related to those two queries. Because the processes where still running even when all queries were closed, I assumed they belonged to some zombie process that and that was the only unusual thing that happened in LinqPad.