Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertx timing out on slow hardware #41

Open
2 tasks done
JoySpaceCats opened this issue May 26, 2018 · 0 comments
Open
2 tasks done

Vertx timing out on slow hardware #41

JoySpaceCats opened this issue May 26, 2018 · 0 comments

Comments

@JoySpaceCats
Copy link

JoySpaceCats commented May 26, 2018

Before

  • I have checked for similar issues already
  • My issue is not a bad syncronisation between the Spotify track and the YouTube audio (Those go here.)

Description

Vertx timing out on slower hardware, in this case a Raspberry Pi 1.

Console Logs

WARNING: Thread Thread[vert.x-eventloop-thread-1,5,main] has been blocked for 5925 ms, time limit is 2000
io.vertx.core.VertxException: Thread blocked
at io.netty.buffer.UnpooledHeapByteBuf.(UnpooledHeapByteBuf.java:50)
at io.netty.buffer.UnpooledUnsafeHeapByteBuf.(UnpooledUnsafeHeapByteBuf.java:29)
at io.netty.buffer.UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf.(UnpooledByteBufAllocator.java:122)
at io.netty.buffer.UnpooledByteBufAllocator.newHeapBuffer(UnpooledByteBufAllocator.java:64)
at io.netty.buffer.AbstractByteBufAllocator.heapBuffer(AbstractByteBufAllocator.java:162)
at io.netty.buffer.Unpooled.buffer(Unpooled.java:135)
at io.vertx.core.buffer.impl.BufferImpl.(BufferImpl.java:48)
at io.vertx.core.buffer.impl.BufferImpl.(BufferImpl.java:56)
at io.vertx.core.buffer.impl.BufferImpl.(BufferImpl.java:60)
at io.vertx.core.buffer.impl.BufferFactoryImpl.buffer(BufferFactoryImpl.java:40)
at io.vertx.core.buffer.Buffer.buffer(Buffer.java:74)
at io.vertx.core.http.impl.HttpServerResponseImpl.end(HttpServerResponseImpl.java:314)
at org.abimon.eternalJukebox.VertxExtensionsKt.end(VertxExtensions.kt:17)
at org.abimon.eternalJukebox.handlers.api.SiteAPI.popular(SiteAPI.kt:51)
at org.abimon.eternalJukebox.handlers.api.SiteAPI$setup$6.invoke(SiteAPI.kt:44)
at org.abimon.eternalJukebox.handlers.api.SiteAPI$setup$6.invoke(SiteAPI.kt:22)
at org.abimon.eternalJukebox.handlers.api.SiteAPIKt$sam$Handler$511d0e2b.handle(SiteAPI.kt)
at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:223)
at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:101)
at io.vertx.ext.web.impl.RoutingContextWrapper.next(RoutingContextWrapper.java:149)
at io.vertx.ext.web.impl.RouterImpl.handleContext(RouterImpl.java:255)
at io.vertx.ext.web.impl.RouterImpl$$Lambda$40/12463516.handle(Unknown Source)
at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:223)
at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:101)
at io.vertx.ext.web.impl.RoutingContextWrapper.next(RoutingContextWrapper.java:149)
at io.vertx.ext.web.impl.RouterImpl.handleContext(RouterImpl.java:255)
at io.vertx.ext.web.impl.RouterImpl$$Lambda$40/12463516.handle(Unknown Source)
at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:223)
at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:101)
at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:120)
at org.abimon.eternalJukebox.EternalJukebox$5.handle(EternalJukebox.kt:184)
at org.abimon.eternalJukebox.EternalJukebox$5.handle(EternalJukebox.kt:45)
at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:223)
at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:101)
at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:120)
at org.abimon.eternalJukebox.EternalJukebox$3.handle(EternalJukebox.kt:163)
at org.abimon.eternalJukebox.EternalJukebox$3.handle(EternalJukebox.kt:45)
at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:223)
at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:101)
at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:120)
at io.vertx.ext.web.handler.impl.CookieHandlerImpl.handle(CookieHandlerImpl.java:66)
at io.vertx.ext.web.handler.impl.CookieHandlerImpl.handle(CookieHandlerImpl.java:42)
at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:223)
at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:101)
at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:120)
at io.vertx.ext.web.impl.RouterImpl.accept(RouterImpl.java:79)
at org.abimon.eternalJukebox.EternalJukebox$9.invoke(EternalJukebox.kt:248)
at org.abimon.eternalJukebox.EternalJukebox$9.invoke(EternalJukebox.kt:45)
at org.abimon.eternalJukebox.EternalJukeboxKt$sam$Handler$465ca8fc.handle(EternalJukebox.kt)
at io.vertx.core.http.impl.ServerConnection.processMessage(ServerConnection.java:444)
at io.vertx.core.http.impl.ServerConnection.handleMessage(ServerConnection.java:156)
at io.vertx.core.http.impl.HttpServerImpl$ServerHandlerWithWebSockets.handleMessage(HttpServerImpl.java:661)
at io.vertx.core.http.impl.HttpServerImpl$ServerHandlerWithWebSockets.handleMessage(HttpServerImpl.java:614)
at io.vertx.core.net.impl.VertxHandler.lambda$channelRead$1(VertxHandler.java:150)
at io.vertx.core.net.impl.VertxHandler$$Lambda$58/24736373.run(Unknown Source)
at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:342)
at io.vertx.core.impl.ContextImpl$$Lambda$49/32848549.run(Unknown Source)
at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:200)
at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:148)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.vertx.core.http.impl.HttpServerImpl$Http2UpgradeHandler.channelRead(HttpServerImpl.java:929)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.vertx.core.http.impl.Http1xOrH2CHandler.end(Http1xOrH2CHandler.java:49)
at io.vertx.core.http.impl.Http1xOrH2CHandler.channelRead(Http1xOrH2CHandler.java:27)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at java.lang.Thread.run(Thread.java:748)

May 26, 2018 9:43:21 AM io.vertx.ext.web.impl.RoutingContextImplBase
SEVERE: Unexpected exception in route
java.nio.channels.ClosedChannelException
at io.netty.channel.AbstractChannel$AbstractUnsafe.write(...)(Unknown Source)

May 26, 2018 9:43:21 AM io.vertx.ext.web.impl.RoutingContextImplBase
SEVERE: Unexpected exception in route
java.nio.channels.ClosedChannelException
at io.netty.channel.AbstractChannel$AbstractUnsafe.write(...)(Unknown Source)

Additional Information

System:

pi@hypnotoad:~/EternalJukebox $ uname -a
Linux hypnotoad 4.14.34+ #1110 Mon Apr 16 14:51:42 BST 2018 armv6l GNU/Linux

Java:

pi@hypnotoad:/EternalJukebox $ java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-1
deb9u1-b11)
OpenJDK Client VM (build 25.171-b11, mixed mode)

Attempted workaround start script:

#!/bin/bash
export VERTX_OPTS='-D io.vertx.core.impl.BlockedThreadChecker.Level=OFF'
java -jar EternalJukebox.jar

I've had a read around at some solutions online (eclipse-vertx/vert.x#1379) but can't seem to make anything work, after the timeout, the uploaded file also fails to convert I guess due to the timeout :)

[AudioAPI -> jukeboxLocation] [7fc5e4b4-8b3c-4cc6-8466-7f73b8d96cdf] No track info for 03UrZgTINDqvnUMbbIMhql; returning 400
[AudioAPI -> upload] [73303d9c-5b28-468c-a09f-f1dce107fbb2] Failed to convert file-uploads/7a7c7e43-b0e2-4704-a6c9-e24031814bf4 to a0dd9e31-c627-4cf2-9fa8-295ac367494d.m4a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant