Re: ERXObjectStoreCoordinator dispose not releasing database connection?
Re: ERXObjectStoreCoordinator dispose not releasing database connection?
- Subject: Re: ERXObjectStoreCoordinator dispose not releasing database connection?
- From: Alexander Spohr <email@hidden>
- Date: Thu, 13 Mar 2014 14:48:34 +0100
> On Mar 13, 2014, at 8:40 AM, John Pollard <email@hidden> wrote:
>
>> Hi List,
>>
>> I have noticed that the database connections (seen using "show processlist" within mysql) are not being released.
>> I create my own ERXObjectStoreCoordinator and this results in two new mysql connections appearing.
>> When later I call dispose() on that ERXObjectStoreCoordinator, the database connections are not being freed up.
>> The dispose() call is in a Session.terminate() method, called after super.terminate().
Am 13.03.2014 um 14:04 schrieb Aaron Rosenzweig <email@hidden>:
> Hi John,
>
> Yes, that’s a known Apple bug. It creates an extra one to read “Database info” and then never releases it. There is a Wonder method to close database connections like that.
>
> ec.dispose();
> ERXEOAccessUtilities.closeDatabaseConnections(objectStore);
> objectStore.dispose();
Please be aware that this bug might kill your database after a while!
At least using PostgreSQL, the database will keep all changes since the start of the app, as long as the „Database Info“ transaction is not committed - which it never will be.
To avoid this we append „?useBundledJdbcInfo=true“ to all database urls.
atze
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden