Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Threads suddenly start waiting and cause an out of memory error


On Thu, Jun 26, 2014 at 4:42 AM, Claude Quézel <cquezel@xxxxxxxxx> wrote:
> I have a problem with an embedded Jetty application. The application
> suddenly requires à large amount of memory and threads and I get a
> java.lang.OutOfMemoryError: GC overhead limit exceeded.

This OOME means that the GC was running continuously back-to-back so
much so that it's activity prevents the application to get enough CPU

> I did a thread dump and found that almost all threads were waiting like this
> example.
> "qtp146419630-538" prio=10 tid=0x00007f07b0006800 nid=0x45f4 waiting on
> condition [0x00007f07fd7f3000]
>    java.lang.Thread.State: WAITING (parking)
>     at sun.misc.Unsafe.park(Native Method)
>     - parking to wait for  <0x0000000719d430f8> (a
> java.util.concurrent.Semaphore$NonfairSync)
>     at java.util.concurrent.locks.LockSupport.park(
>     at
> java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(
>     at
> java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(
>     at
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(
>     at java.util.concurrent.Semaphore.acquire(
>     at
> org.eclipse.jetty.util.BlockingCallback.block(
>     at org.eclipse.jetty.server.HttpOutput.write(
>     at org.eclipse.jetty.server.HttpOutput.write(
>     at
>     at org.eclipse.jetty.server.HttpOutput.print(
>     at
> javax.servlet.ServletOutputStream.println(
>     at com.example.MyHandler.doPost(
>     at javax.servlet.http.HttpServlet.service(
>     ...
> Does anyone have a clue as what would be the cause of this problem and a
> solution?

We have committed a fix in the current master.
If you can build from the sources and retry that will be great.
Let us know.

Thanks !

Simone Bordet
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.

Back to the top