Huge memory leak when using PostgreSQLDirect.NET
Posted: Tue 29 Mar 2005 09:33
I am using the latest release 2.00.2 of PostgreSQLDirect.NET.
When I insert 7.000 records into a table with about 50 fields the "postgres.exe" process that serves the connection goes to a memory usage of 200MB.
Restarting the PostgreSQL service and deleting 7.000 records from the same table brings the memory usage to 90MB.
Updating 7.000 records in the same table brings the memory usage to more than 500MB!!!
Selecting records is no problem.
The process "postgres.exe" never releases the memory until the connection is closed. If you insert, update or delete even more records within the same connection memory usage of "postgres.exe" increases until the system dies when it runs out of available memory.
This is not a bug in "postgres.exe" however. As soon as I switch to another driver like "npgsql" the memory usage of "postgres.exe" stays within the limits that I have configured in "postgresql.conf". (12MB)
Something in the PostgreSQLDirect.NET driver makes the "postgres.exe" process that serves the connection lose memory very rapidly!
Regards,
Joern
When I insert 7.000 records into a table with about 50 fields the "postgres.exe" process that serves the connection goes to a memory usage of 200MB.
Restarting the PostgreSQL service and deleting 7.000 records from the same table brings the memory usage to 90MB.
Updating 7.000 records in the same table brings the memory usage to more than 500MB!!!
Selecting records is no problem.
The process "postgres.exe" never releases the memory until the connection is closed. If you insert, update or delete even more records within the same connection memory usage of "postgres.exe" increases until the system dies when it runs out of available memory.
This is not a bug in "postgres.exe" however. As soon as I switch to another driver like "npgsql" the memory usage of "postgres.exe" stays within the limits that I have configured in "postgresql.conf". (12MB)
Something in the PostgreSQLDirect.NET driver makes the "postgres.exe" process that serves the connection lose memory very rapidly!
Regards,
Joern