From: | "Ioannis Anagnostopoulos" <ioannis(at)anatec(dot)com> |
---|---|
To: | <pgsql-novice(at)postgresql(dot)org> |
Subject: | Linux server connection process consumes all memory |
Date: | 2011-12-03 22:45:11 |
Message-ID: | B56C2BFC6806BE4A9C86ADDDD269933A6E8A09@appserver.anatec.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi all,
This is my first post here and as I wanted to play it safe my first option was the novice list. My problem is as follows:
I have a simple select command that I need for some reason to execute it around 22million times. In fact it is a prepared command from a .net environment. I have used both ado.net postgres options (the freeware NPGSQL and the commercial from Devart) and the behaviour is the same. What happens is that once I establish the connection with the corresponding connection object, a new process is created on the server as expected. When I start iterating executing the select command as time goes by the memory footprint of the process grows bigger and bigger. Sooner or later the server either collapses or becomes unworkable as the physical memory gets exhausted and the swap is heavily used. This is just a simple select, with a data reader that I make sure to close after each iteration. I find no reason why the connection process on the server gets so out of control. Is it caching data? If yes I don't want to. Do I need to close the connection every so often to free up the memory?
Any help will be much appreciated
Kind Regards
Yiannis
From | Date | Subject | |
---|---|---|---|
Next Message | Alan Hodgson | 2011-12-03 23:58:38 | Re: Linux server connection process consumes all memory |
Previous Message | Henry Drexler | 2011-12-02 16:28:07 | Re: stumped on a with recursive example |