Giter Site home page Giter Site logo

Server stuck on Exception about javalin HOT 14 CLOSED

javalin avatar javalin commented on May 5, 2024
Server stuck on Exception

from javalin.

Comments (14)

vellrya avatar vellrya commented on May 5, 2024 1

Unfortunately not, but if the error repeats again (it was already twice), then I will send it to you

from javalin.

tipsy avatar tipsy commented on May 5, 2024

That seems odd. Could you tell me the steps to reproduce this?

from javalin.

vellrya avatar vellrya commented on May 5, 2024

During the multipart request, the mobile network on my phone disconnected. I got the Multipart parsing failed error. I returned the network to the device and decided to repeat the request, but the server no longer responded. Then I pressed Ctrl+C to stop and restart it. And then I saw the execution of my previous request and the server was again ready to work. The reboot did not happen - the server just continued to work from the place where it stuck.

from javalin.

tipsy avatar tipsy commented on May 5, 2024

Do you have the stacktrace still?

from javalin.

vellrya avatar vellrya commented on May 5, 2024

Ok, here it is. Again(

[qtp377478451-17] WARN org.eclipse.jetty.server.HttpChannel - /ocrit
java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 30028/30000 ms
        at org.eclipse.jetty.server.HttpInput$ErrorState.noContent(HttpInput.java:1069)
        at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:309)
        at java.io.InputStream.read(Unknown Source)
        at kotlin.io.ByteStreamsKt.copyTo(IOStreams.kt:105)
        at kotlin.io.ByteStreamsKt.copyTo$default(IOStreams.kt:98)
        at kotlin.io.ByteStreamsKt.readBytes(IOStreams.kt:117)
        at kotlin.io.ByteStreamsKt.readBytes$default(IOStreams.kt:115)
        at io.javalin.embeddedserver.CachedRequestWrapper.<init>(CachedRequestWrapper.kt:17)
        at io.javalin.core.JavalinServlet.service(JavalinServlet.kt:37)
        at io.javalin.embeddedserver.jetty.EmbeddedJettyServer$start$httpHandler$1.doHandle(EmbeddedJettyServer.kt:34)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1568)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:61)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
        at org.eclipse.jetty.server.Server.handle(Server.java:561)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:334)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.TimeoutException: Idle timeout expired: 30028/30000 ms
        at org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:166)
        at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        ... 1 more
        Suppressed: java.lang.Throwable: HttpInput failure
                at org.eclipse.jetty.server.HttpInput.failed(HttpInput.java:816)
                at org.eclipse.jetty.server.HttpConnection$BlockingReadCallback.failed(HttpConnection.java:612)
                at org.eclipse.jetty.io.FillInterest.onFail(FillInterest.java:136)
                at org.eclipse.jetty.io.AbstractEndPoint.onIdleExpired(AbstractEndPoint.java:398)
                ... 9 more

The connection on my phone is still bad, and it causes such an exception. The only problem is that the server stops working until Ctrl+C is pressed

from javalin.

tipsy avatar tipsy commented on May 5, 2024

Thanks, I'll try to find out what's wrong. Could you also include the code that's causing this?

from javalin.

tipsy avatar tipsy commented on May 5, 2024

@vellrya could you build this branch https://github.com/tipsy/javalin/tree/issue-73 and see if that fixes the issue?

from javalin.

vellrya avatar vellrya commented on May 5, 2024

@tipsy Can you post changes to Maven or provide Jar, please?

from javalin.

tipsy avatar tipsy commented on May 5, 2024

I can build you a jar in an hour or two when I get home. If want to try before that, you can checkout the branch and run mvn clean install, then depend on 0.5.3-SNAPSHOT.

from javalin.

tipsy avatar tipsy commented on May 5, 2024

@vellrya here is the jar: https://drive.google.com/open?id=0BzKbHpeI5ubmQVo0bDdzdXBTbW8

from javalin.

vellrya avatar vellrya commented on May 5, 2024

Ok, I'll try this.

from javalin.

vellrya avatar vellrya commented on May 5, 2024

Unfortunately, the problem remained. Now I see no exceptions, the server just stucks. Experienced, I found that, in addition to Ctrl + C, the right mouse button can be used to continue the server operation. Perhaps, if I fully describe my problem, a solution will be found. I'm testing the speed of uploading files. I upload small pictures to the server (about 40 KB). When connecting via Wi-Fi, the download takes less than 100 ms, but uploading the same picture via the mobile Internet requires 10+ seconds. Speedtest shows that the upload speed is 0.5mb, so picture of 40 KB should send less than 1 second (320 kilobits / 512 =0.625), but that's not the case. So, in some cases, the upload time for unknown reasons reaches 30 seconds and then timeout Exception throwing. As far as I understand, it is after such incidents that the server gets stuck

P.S. I hope that Google translator retained the basic idea)

from javalin.

tipsy avatar tipsy commented on May 5, 2024

Now I see no exceptions, the server just stucks

Do you have a logger enabled? Add

<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-simple</artifactId>
    <version>1.7.21</version>
</dependency>

to your POM and you should get a log message like "Exception occurred while servicing request", and a stacktrace. I'm surprised it still gets stuck though, I wrapped the body of the Jetty doHandle method in a try-catch, and if that doesn't work the problem has to be with Jetty itself. Debugging this is a bit tricky, but I'll see if I can reproduce it in the weekend.

from javalin.

tipsy avatar tipsy commented on May 5, 2024

Going to close this since no other people have reported it happening in three months, and I can't reproduce it either.

from javalin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.