Linux server connection process consumes all memory

Поиск
Список
Период
Сортировка
От Ioannis Anagnostopoulos
Тема Linux server connection process consumes all memory
Дата
Msg-id B56C2BFC6806BE4A9C86ADDDD269933A6E8A09@appserver.anatec.local
обсуждение исходный текст
Ответы Re: Linux server connection process consumes all memory  (Alan Hodgson <ahodgson@simkin.ca>)
Re: Linux server connection process consumes all memory  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

В списке pgsql-novice по дате отправления:

Предыдущее
От: Henry Drexler
Дата:
Сообщение: Re: stumped on a with recursive example
Следующее
От: Alan Hodgson
Дата:
Сообщение: Re: Linux server connection process consumes all memory