Note that there are some explanatory texts on larger screens.

plurals
  1. POJava Thread lags/long sleeps on Ubuntu/Jetty
    primarykey
    data
    text
    <p>I am running Java web server on Jetty 6 on Ubunu,for reverse-ajax based web. And I have serious problems with lagging threads which resend data to browsers. Very often some thread just start to sleep for long time. Like 1 sec and more, sometimes even hours. I thought first that it is bug of ajax library (DWR), than that it is Jetty problem, than that it is Java bug, but all suspicions are probably wrong. I lost weeks trying to solve this issue. I am completly lost. The only think I didn't try is to run it on another OS, like windows. Here is the stacktrace of the thread which usually lags:</p> <pre><code>Cancelled at this stacktrace: at java.lang.Object.wait(Native Method) at org.mortbay.io.nio.SelectChannelEndPoint.blockWritable(SelectChannelEndPoint.java:279) at org.mortbay.jetty.AbstractGenerator$Output.blockForOutput(AbstractGenerator.java:544) at org.mortbay.jetty.AbstractGenerator$Output.flush(AbstractGenerator.java:571) at org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:997) at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:648) at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:579) at java.io.ByteArrayOutputStream.writeTo(ByteArrayOutputStream.java:109) at org.mortbay.jetty.AbstractGenerator$OutputWriter.write(AbstractGenerator.java:903) at org.mortbay.jetty.AbstractGenerator$OutputWriter.write(AbstractGenerator.java:752) at org.mortbay.jetty.AbstractGenerator$OutputWriter.write(AbstractGenerator.java:741) at java.io.PrintWriter.write(PrintWriter.java:412) at java.io.PrintWriter.write(PrintWriter.java:429) at java.io.PrintWriter.print(PrintWriter.java:559) at java.io.PrintWriter.println(PrintWriter.java:695) at org.directwebremoting.dwrp.PlainScriptConduit.addScript(PlainScriptConduit.java:93) at org.directwebremoting.impl.DefaultScriptSession.addScript(DefaultScriptSession.java:239) at server.comunication.dwr.OneReverseDWRServer.sendLocalBuffer(OneReverseDWRServer.java:385) at server.comunication.dwr.OneReverseDWRServer.sendMessageLocal(OneReverseDWRServer.java:363) at server.comunication.dwr.OneReverseDWRServer.sendMessage(OneReverseDWRServer.java:412) at server.comunication.messaging.SendTask.call(SendTask.java:53) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) </code></pre> <p>When I tried different jetty connection Selector, stack trace was different but it was waiting on some similar place. I tried many versions of combinations of Jetty and Java. I thought it might be NIO bug, but when I changed selector to non-nio, it was stacked on other place.</p> <p>Can be problem on Linux? I am running it as root. Are there some setting in ubuntu which I can change to force waiting threads to weak up as they should? Pls. help, I am completely lost here.</p> <p>thanks </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload