Comments (14)
Unfortunately not, but if the error repeats again (it was already twice), then I will send it to you
from javalin.
That seems odd. Could you tell me the steps to reproduce this?
from javalin.
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.
Do you have the stacktrace still?
from javalin.
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.
Thanks, I'll try to find out what's wrong. Could you also include the code that's causing this?
from javalin.
@vellrya could you build this branch https://github.com/tipsy/javalin/tree/issue-73 and see if that fixes the issue?
from javalin.
@tipsy Can you post changes to Maven or provide Jar, please?
from javalin.
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.
@vellrya here is the jar: https://drive.google.com/open?id=0BzKbHpeI5ubmQVo0bDdzdXBTbW8
from javalin.
Ok, I'll try this.
from javalin.
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.
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.
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)
- HTML Output for "attrs()" in combination with ".withClass()" does not work HOT 1
- Validator#hasValue not judge the string is non blank HOT 6
- Better validation error messages for json deserialization HOT 7
- java.lang.IllegalStateException: Form with too many parts [1001 > 1000] HOT 4
- Option to be informed if client cancels a request HOT 6
- Component system HOT 8
- Improve DevLoggingPlugin HOT 2
- What is the proper way to link css files with jte pages? HOT 9
- Support for Jetty 12 HOT 7
- Tus server implementation for reliable chunked upload. HOT 1
- Skip static files in DevLogginPlugin doesn`t skip .map files HOT 1
- javalinVue: not able to get LoadableData to work HOT 2
- OpenAPI schema-first generator: issues with order of routes HOT 6
- Register multiple paths for single handler HOT 3
- Is there a way to read the current rate limit. HOT 3
- SpaRoot sending wrong Mime Type HOT 2
- Static files with SSL plugin HOT 1
- Path Parameters Unavailable in beforeMatched HOT 1
- Move javalin-rendering back into main repo HOT 8
- Javalin 7 API redesign HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javalin.