+1 for HttpClient.

2010/12/1 Mike Schrag <msch...@pobox.com>

> Just never use that class. Rewrite your stuff with Commons HttpClient and
> you'll be happier all around.
>
> Sent from my iPhone
>
> On Dec 1, 2010, at 2:00 AM, D Tim Cummings <t...@triptera.com.au> wrote:
>
> Hi Q
>
> WOHTTPConnection sendRequest(WORequest request) creates a new thread to
> implement timeout.  I was creating threads also because the sendRequest
> implementation of timeout wasn't working for me.  I disabled my code that
> created threads but was still getting the OutOfMemory problem.
>
> Start of the thread dump below. I was able to reproduce the problem by
> manually clicking on the refresh page button over and over again.
>
> jstack 9451
> 2010-12-01 16:52:02
> Full thread dump Java HotSpot(TM) 64-Bit Server VM (16.3-b01 mixed mode):
>
> "Attach Listener" daemon prio=10 tid=0x0000000057371800 nid=0x4485 waiting
> on condition [0x0000000000000000]
>    java.lang.Thread.State: RUNNABLE
>
> "Thread-1129" prio=10 tid=0x0000000057093800 nid=0x2cde in Object.wait()
> [0x000000005bb4a000]
>    java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x00002aaab07d17a8> (a [Z)
> at java.lang.Object.wait(Object.java:485)
> at
> com.webobjects.appserver._private.WOUrlConnection$UrlDataReader.run(WOUrlConnection.java:452)
> - locked <0x00002aaab07d17a8> (a [Z)
> at java.lang.Thread.run(Thread.java:619)
>
> "Thread-1126" prio=10 tid=0x00000000564f8000 nid=0x2cdb in Object.wait()
> [0x000000005ba49000]
>    java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x00002aaab0784fc8> (a [Z)
> at java.lang.Object.wait(Object.java:485)
> at
> com.webobjects.appserver._private.WOUrlConnection$UrlDataReader.run(WOUrlConnection.java:452)
> - locked <0x00002aaab0784fc8> (a [Z)
> at java.lang.Thread.run(Thread.java:619)
>
> "Thread-1123" prio=10 tid=0x00000000564af000 nid=0x2cd8 in Object.wait()
> [0x000000005b948000]
>    java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x00002aaab073c040> (a [Z)
> at java.lang.Object.wait(Object.java:485)
> at
> com.webobjects.appserver._private.WOUrlConnection$UrlDataReader.run(WOUrlConnection.java:452)
> - locked <0x00002aaab073c040> (a [Z)
> at java.lang.Thread.run(Thread.java:619)
>
> "Thread-1120" prio=10 tid=0x00000000563e0800 nid=0x2cd5 in Object.wait()
> [0x000000005b847000]
>    java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x00002aaab06f18f0> (a [Z)
> at java.lang.Object.wait(Object.java:485)
> at
> com.webobjects.appserver._private.WOUrlConnection$UrlDataReader.run(WOUrlConnection.java:452)
> - locked <0x00002aaab06f18f0> (a [Z)
> at java.lang.Thread.run(Thread.java:619)
>
> "Thread-1117" prio=10 tid=0x000000005695c000 nid=0x2cd2 in Object.wait()
> [0x000000005b746000]
>    java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x00002aaab06a5360> (a [Z)
> at java.lang.Object.wait(Object.java:485)
> at
> com.webobjects.appserver._private.WOUrlConnection$UrlDataReader.run(WOUrlConnection.java:452)
> - locked <0x00002aaab06a5360> (a [Z)
> at java.lang.Thread.run(Thread.java:619)
>
> "Thread-1114" prio=10 tid=0x00000000566de800 nid=0x2cc0 in Object.wait()
> [0x000000005b645000]
>    java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x00002aaab0659af8> (a [Z)
> at java.lang.Object.wait(Object.java:485)
> at
> com.webobjects.appserver._private.WOUrlConnection$UrlDataReader.run(WOUrlConnection.java:452)
> - locked <0x00002aaab0659af8> (a [Z)
> at java.lang.Thread.run(Thread.java:619)
>
> "Thread-1111" prio=10 tid=0x0000000057098800 nid=0x2cbd in Object.wait()
> [0x000000005b544000]
>    java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x00002aaab060e6a0> (a [Z)
> at java.lang.Object.wait(Object.java:485)
> at
> com.webobjects.appserver._private.WOUrlConnection$UrlDataReader.run(WOUrlConnection.java:452)
> - locked <0x00002aaab060e6a0> (a [Z)
> at java.lang.Thread.run(Thread.java:619)
>
> "Thread-1108" prio=10 tid=0x0000000057097800 nid=0x2cba in Object.wait()
> [0x000000005b443000]
>    java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x00002aaab05c45f8> (a [Z)
> at java.lang.Object.wait(Object.java:485)
> at
> com.webobjects.appserver._private.WOUrlConnection$UrlDataReader.run(WOUrlConnection.java:452)
> - locked <0x00002aaab05c45f8> (a [Z)
> at java.lang.Thread.run(Thread.java:619)
>
> "Thread-1105" prio=10 tid=0x0000000057330000 nid=0x2cb7 in Object.wait()
> [0x000000005b342000]
>    java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x00002aaab057f298> (a [Z)
> at java.lang.Object.wait(Object.java:485)
> at
> com.webobjects.appserver._private.WOUrlConnection$UrlDataReader.run(WOUrlConnection.java:452)
> - locked <0x00002aaab057f298> (a [Z)
> at java.lang.Thread.run(Thread.java:619)
>
> "Thread-1102" prio=10 tid=0x00000000564b5800 nid=0x2cb4 in Object.wait()
> [0x000000005b241000]
>    java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x00002aaab0535cc8> (a [Z)
> at java.lang.Object.wait(Object.java:485)
> at
> com.webobjects.appserver._private.WOUrlConnection$UrlDataReader.run(WOUrlConnection.java:452)
> - locked <0x00002aaab0535cc8> (a [Z)
> at java.lang.Thread.run(Thread.java:619)
>
> "Thread-1099" prio=10 tid=0x00000000564ee000 nid=0x2cb1 in Object.wait()
> [0x000000005b140000]
>    java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x00002aaab04e9d98> (a [Z)
> at java.lang.Object.wait(Object.java:485)
> at
> com.webobjects.appserver._private.WOUrlConnection$UrlDataReader.run(WOUrlConnection.java:452)
> - locked <0x00002aaab04e9d98> (a [Z)
> at java.lang.Thread.run(Thread.java:619)
>
> "Thread-1096" prio=10 tid=0x000000005699a800 nid=0x2cae in Object.wait()
> [0x000000005b03f000]
>    java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x00002aaab049ea28> (a [Z)
> at java.lang.Object.wait(Object.java:485)
> at
> com.webobjects.appserver._private.WOUrlConnection$UrlDataReader.run(WOUrlConnection.java:452)
> - locked <0x00002aaab049ea28> (a [Z)
> at java.lang.Thread.run(Thread.java:619)
>
>
>
> On 01/12/2010, at 4:04 PM, Q wrote:
>
>
> On 01/12/2010, at 3:36 PM, D Tim Cummings wrote:
>
> We have a sessionless app that we have been running for years on Mac OS X
> on XServes.  We recently moved it to Red Hat servers and now we are getting
> Out of Memory errors even though we have significantly increased the memory
> available.  Red Hat is using the java sun jvm 1.6.0_20 64 bit, while the Mac
> servers were running java from Apple 1.5.0_24.  I also tried on my Mac
> workstation using Apple java 1.6.0.22 64 bit and the memory appeared to be
> getting garbage collected without problem.
>
> I configured the app to do a heap dump when the error occured (Additional
> arguments -XX:+HeapDumpOnOutOfMemoryError ) and used the Eclipse Memory
> Analyzer Tool ( <http://www.eclipse.org/mat>http://www.eclipse.org/mat)
> and it reported the following problem suspects:
>
> 1,296 instances of "java.lang.Thread", loaded by "<system class
> loader>" occupy 111,947,632 (43.21%) bytes.
> 1,292 instances of "er.extensions.eof.ERXEC", loaded
> by "java.net.URLClassLoader @ 0x2aaab375b7c0" occupy 37,478,352
> (14.46%) bytes.
> 1,280 instances of "er.extensions.appserver.ERXRequest", loaded
> by "java.net.URLClassLoader @ 0x2aaab375b7c0" occupy 27,297,992
> (10.54%) bytes.
>
>
> It looks to me like your app had 1280 odd concurrent request handling
> threads running. Is it likely that they are getting deadlocked or not
> running to completion? Do you launch any new threads programmatically?
>
> Try making a thread dump of the app and see what's running.
>
> --
> Seeya...Q
>
> Quinton Dolan - <qdo...@gmail.com>qdo...@gmail.com
> Gold Coast, QLD, Australia (GMT+10)
>
>
>
>
>
> _______________________________________________
> 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/mschrag%40pobox.com
>
> This email sent to <msch...@pobox.com>msch...@pobox.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/probert%40macti.ca
>
> This email sent to prob...@macti.ca
>
 _______________________________________________
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