On Aug 14, 2008, at 2:33 PM, Andrew Mottaz wrote:

Correct -- but you could have both. The statement about infecting other instances leads me to believe that there must be a DB lock in play somewhere ( Unless the offending request keeps failing over to the next instance, causing a domino effect, which I guess is possible.

I've seen that happen with direct actions that don't require a session.


Chuck

On Aug 14, 2008, at 12:46 PM, Chuck Hill wrote:


On Aug 14, 2008, at 12:15 PM, Andrew Mottaz wrote:

I'ts a deadlock in the database

Not the database, EOF. If it was blocked at the database level the threads would be blocked in the JDBC driver.

Chuck


-- places to look:

1) Background threads / long response pages -- Never pass in any EO's from an EC that exists - pass in GID's, create an editing context in the thread and fetch to that EC. I've used the shared EC in a background thread without problems, but you never know. Never use an editing context, or EOs in an editing context across threads.

2) Make sure you are locking and unlocking EC's properly everywhere.

Hope this helps.

Best,

Andrew


On Aug 14, 2008, at 11:58 AM, Chuck Hill wrote:


On Aug 14, 2008, at 11:49 AM, Alan Zebchuk wrote:
On 14-Aug-08, at 9:26 PM, Chuck Hill wrote:
On Aug 14, 2008, at 9:48 AM, Alan Zebchuk wrote:

Has anyone ever seen a case where multiple instances of an app become non-responsive almost simultaneously?

The log file has this:

2008-08-14 11:50:22,348 DEBUG MyApp[72021:2023 23] NSLog (ERXNSLogLog4jBridge.java:46) - <com.webobjects.appserver._private.WODefaultAdaptor>: Growing number of WOWorkerThreads to 32 2008-08-14 11:50:52,350 DEBUG MyApp[72020:2009 34] NSLog (ERXNSLogLog4jBridge.java:46) - <com.webobjects.appserver._private.WODefaultAdaptor>: Growing number of WOWorkerThreads to 32

I'd take that as an almost certain sign of deadlock. It might be on the database if this happens to all instances almost simultaneously. It could also be a very sharp, sudden spike in load.

The applications has a fairly consistent load.

Are you dispatching requests concurrently?

But no further information.

The projects are both using Wonder and have all the automatic editing context locking enabled.

Any help is greatly appreciated.

When this happens, get a thread dump of each instance. Without that, you are just guessing.

http://www.gvcsitemaker.com/gvc.webobjects/faq&mode=single&recordID=41413

I have a thread dump. In both cases, there's 1 thread that's IN_NATIVE

Thread [EMAIL PROTECTED]: (state = IN_NATIVE)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) @bci=0 (Interpreted frame) - java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=7, line=384 (Interpreted frame) - java.net.ServerSocket.implAccept(java.net.Socket) @bci=50, line=450 (Interpreted frame) - java.net.ServerSocket.accept() @bci=48, line=421 (Interpreted frame) - com.webobjects.appserver._private.WOWorkerThread.run() @bci=26, line=238 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=613 (Interpreted frame)


And all the other threads are BLOCKED:


Thread [EMAIL PROTECTED]: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=474 (Interpreted frame)
- com.webobjects.foundation.NSMultiReaderLock $ConditionLock.await() @bci=12, line=506 (Interpreted frame) - com.webobjects.foundation.NSMultiReaderLock._lockForWriting() @bci=92, line=204 (Compiled frame) - com.webobjects.foundation.NSMultiReaderLock.lockForWriting() @bci=8, line=165 (Compiled frame) - com .webobjects .eocontrol .EOEditingContext .objectsWithFetchSpecification (com.webobjects.eocontrol.EOFetchSpecification, com.webobjects.eocontrol.EOEditingContext) @bci=70, line=4112 (Interpreted frame) - er .extensions .eof .ERXEC .objectsWithFetchSpecification (com.webobjects.eocontrol.EOFetchSpecification, com.webobjects.eocontrol.EOEditingContext) @bci=10, line=1109 (Interpreted frame) - com .webobjects .eocontrol .EOEditingContext .objectsWithFetchSpecification (com.webobjects.eocontrol.EOFetchSpecification) @bci=3, line=4500 (Interpreted frame) - com .webobjects .eoaccess .EOUtilities .objectWithPrimaryKey(com.webobjects.eocontrol.EOEditingContext, java.lang.String, com.webobjects.foundation.NSDictionary) @bci=34, line=433 (Interpreted frame) - com .webobjects .eoaccess .EOUtilities .objectWithPrimaryKeyValue (com.webobjects.eocontrol.EOEditingContext, java.lang.String, java.lang.Object) @bci=10, line=405 (Interpreted frame)

NSMultiReaderLock. Sniff. Smells like EOSharedEditingContext. I don't use it, but my first guess is mis-use of the shared EC. And EOF deadlock somehow or other.


Chuck



--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






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

This email sent to [EMAIL PROTECTED]



--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






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

This email sent to [EMAIL PROTECTED]



--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






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

This email sent to [EMAIL PROTECTED]

Reply via email to