In a Windows Forms application using dotConnect for PostgreSQL, I'm seeing in the Windows Task Manager memory usage for one of the postgres.exe processes continually increase with every table adapter insert and never going down until the Windows Forms application exits.
When using table adapters with dotConnect/PostgreSQL, is there something I should be doing to e.g. release connections or something else that might be affecting the memory usage of postgres.exe?
I've reduced it to a simple program to demonstrate the symptom. A database with one table, with one column. The Windows Forms application has a button called "Start" with the following code:
testdcDataSetTableAdapters.testdctableTableAdapter ta =
new TestDotConnect.testdcDataSetTableAdapters.testdctableTableAdapter();
for (int i = 0; i < 10000; i++)
ta.Insert(i);
Clicking that "Start" button causes postgres.exe to climb, over the course of half a minute or so, from 10MB to 40MB. Then it stays there until I fully exit from the Windows Forms application.
My real application needs to insert 100,000 records of about three dozen columns, and postgres.exe memory usage grows to 1GB or 2GB, often crashing the computer as this is a desktop application.
Memory leak when using table adapter
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Could you please specify the exact versions of the PostgreSQL server and dotConnect for PostgreSQL you are using?
I will send you a test project, please check that it is not blocked by your mail filter. Please tell us what should be changed in the sample to reproduce the problem.
You will probably need to change the connectiong string in app.config. The table used in the sample is defined as
I will send you a test project, please check that it is not blocked by your mail filter. Please tell us what should be changed in the sample to reproduce the problem.
You will probably need to change the connectiong string in app.config. The table used in the sample is defined as
Code: Select all
CREATE TABLE dept
(
deptno integer NOT NULL,
dname character varying(14),
loc character varying(13),
CONSTRAINT dept_pkey PRIMARY KEY (deptno)
)
-
- Posts: 3
- Joined: Tue 12 Oct 2010 23:26
4.55.49.0
I am using version 4.55.49.0 of dotConnect for PostgreSQL. My PostgreSQL is version 8.4.1.
I experienced the same symptoms with the Visual Studio project you e-mailed me.
Before I purchase the upgrade to dotConnect, would you be able to repeat the test on your end with 4.55.49.0? Or is there any easy way for me to test using the trial version without disrupting the licensing of dotConnect on my system?
I experienced the same symptoms with the Visual Studio project you e-mailed me.
Before I purchase the upgrade to dotConnect, would you be able to repeat the test on your end with 4.55.49.0? Or is there any easy way for me to test using the trial version without disrupting the licensing of dotConnect on my system?
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
We have reproduced the problem with the 4.55.49 version when connecting to the local server, and could not with the latest 4.95.170 version.
As for the trial, it can only be installed after removing dotConnect for PostgreSQL currently installed on your computer. You can try the latest version on another workstation or on a virtual machine instead.
As for the trial, it can only be installed after removing dotConnect for PostgreSQL currently installed on your computer. You can try the latest version on another workstation or on a virtual machine instead.
-
- Posts: 3
- Joined: Tue 12 Oct 2010 23:26
Yes, fixed in 4.95
I renewed my subscription and downloaded dotConnect for PostgreSQL 4.95, and that did indeed solve the problem of postgres.exe leaking memory. Thank you!