I didn't play with it for a long time but you have to use the databaseContext 
delegate 
see 
http://webobjects.mdimension.com/hudson/job/Wonder/javadoc/er/extensions/eof/ERXDatabaseContextDelegate.html

and implement your own policy (retry several times then gives up).

However, if the web app stop to reconnect, it must be handled at a higher level 
because the service should return an error. And then the apache adaptor must 
stop to send it new requests but I don't know how to do that 
(application.terminate()????). Or play with the WOAdaptor 
(unregisterForEvents())   
http://www.webobjects.me/API/wo542/com/webobjects/appserver/WOAdaptor.html

It's surely easier to fix the database issue but you know already that.

Philippe

On 17 oct. 2011, at 16:51, Alexander Spohr wrote:

> 
> Am 17.10.2011 um 16:19 schrieb Philippe Rabier:
> 
>> Alexander, do you open a database connection each time the web app receives 
>> an incoming request?
> 
> No. But the app tries to reconnect when the database goes down.
> 
>       atze
> 
> 
> 
>> 
>> Philippe
>> 
>> Sent from my iPhone
>> 
>> On 17 oct. 2011, at 14:54, Alexander Spohr <a...@freeport.de> wrote:
>> 
>>> Hi list,
>>> 
>>> we have a rather busy WO-service. Sometimes one of our multiple database 
>>> servers fails and CLOSE_WAIT shows its ugly head and kills the performance.
>>> 
>>> What I think the problem is:
>>> - WebServer asks AppServer for data
>>> - AppServer tries to connect to db
>>> - more requests come in
>>> - AppServer tries to connect to db
>>> - more requests come in
>>> - AppServer tries to connect to db
>>> - more requests come in
>>> ...
>>> Then after a while the WebServers close their side of the connection but 
>>> the app connection threads still wait in queue for the database. So the app 
>>> never acknowledges the close and we slowly die.
>>> 
>>> Is this what happens?
>>> Can we do something against it?
>>> A delegate method perhaps, to throw an error if we can not connect to the 
>>> db? (And of course retrying later to reconnect - after all the database 
>>> will come online again)
>>> 
>>> Any pointers are welcome,
>>> 
>>>  atze
>>> 
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/prabier%40me.com
>>> 
>>> This email sent to prab...@me.com
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to