Function referred to in log messages: def findById(id: ObjectId, projFields: Option[ProjectionView] = None)(implicit m: Manifest[BaseModel], ec: ExecutionContext): Future[Option[BaseModel]] = { val query = Filters.equal("_id", id) collection.find(query).projections(projFields).first() .map(doc => mdeserialize(doc)) .toFuture() .recoverWith{ case e: Throwable => { Future.failed(e) } } .map(_.headOption) } Server Restarted ================ #logback.classic pattern: %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n 2018-11-08 18:10:36 [rest-service-akka.actor.default-dispatcher-5] WARN akka.actor.ActorSystemImpl - host 0.0.0.0, port 9000 2018-11-08 18:10:36 [rest-service-akka.actor.default-dispatcher-5] WARN akka.actor.ActorSystemImpl - Using database bcmongo 2018-11-08 18:10:36 [rest-service-akka.actor.default-dispatcher-5] WARN akka.actor.ActorSystemImpl - host 0.0.0.0 2018-11-08 18:16:11 [cluster-ClusterId{value='5be4c26db0aba32801cc7eff', description='null'}-cluster0-shard-00-02-docco.mongodb.net:27017] ERROR io.netty.util.ResourceLeakDetector - LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information. WARNING: 219 leak records were discarded because the leak record count is limited to 4. Use system property io.netty.leakDetection.maxRecords to increase the limit. Recent access records: 4 #4: io.netty.buffer.AdvancedLeakAwareByteBuf.release(AdvancedLeakAwareByteBuf.java:724) com.mongodb.connection.netty.NettyByteBuf.release(NettyByteBuf.java:239) com.mongodb.connection.ByteBufferBsonOutput.close(ByteBufferBsonOutput.java:181) com.mongodb.connection.InternalStreamConnection.sendAndReceiveAsync(InternalStreamConnection.java:324) com.mongodb.connection.UsageTrackingInternalConnection.sendAndReceiveAsync(UsageTrackingInternalConnection.java:113) com.mongodb.connection.DefaultConnectionPool$PooledConnection.sendAndReceiveAsync(DefaultConnectionPool.java:452) com.mongodb.connection.CommandProtocolImpl.executeAsync(CommandProtocolImpl.java:76) com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.executeAsync(DefaultServer.java:203) com.mongodb.connection.DefaultServerConnection.executeProtocolAsync(DefaultServerConnection.java:280) com.mongodb.connection.DefaultServerConnection.commandAsync(DefaultServerConnection.java:151) com.mongodb.connection.DefaultServerConnection.commandAsync(DefaultServerConnection.java:142) com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocolAsync(CommandOperationHelper.java:380) com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocolAsync(CommandOperationHelper.java:282) com.mongodb.operation.FindOperation$2$1.call(FindOperation.java:765) com.mongodb.operation.OperationHelper$5.call(OperationHelper.java:236) com.mongodb.operation.OperationHelper.validateCollation(OperationHelper.java:135) com.mongodb.operation.OperationHelper$4.call(OperationHelper.java:224) com.mongodb.operation.OperationHelper.validateReadConcern(OperationHelper.java:94) com.mongodb.operation.OperationHelper.validateReadConcernAndCollation(OperationHelper.java:218) com.mongodb.operation.OperationHelper.validateReadConcernAndCollation(OperationHelper.java:233) com.mongodb.operation.FindOperation$2.call(FindOperation.java:757) com.mongodb.operation.OperationHelper$7.onResult(OperationHelper.java:526) com.mongodb.operation.OperationHelper$7.onResult(OperationHelper.java:523) com.mongodb.connection.DefaultServer$1.onResult(DefaultServer.java:102) com.mongodb.connection.DefaultServer$1.onResult(DefaultServer.java:93) com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) com.mongodb.connection.DefaultConnectionPool.openAsync(DefaultConnectionPool.java:189) com.mongodb.connection.DefaultConnectionPool.getAsync(DefaultConnectionPool.java:146) com.mongodb.connection.DefaultServer.getConnectionAsync(DefaultServer.java:93) com.mongodb.binding.AsyncClusterBinding$AsyncClusterBindingConnectionSource.getConnection(AsyncClusterBinding.java:114) com.mongodb.async.client.ClientSessionBinding$SessionBindingAsyncConnectionSource.getConnection(ClientSessionBinding.java:124) com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:523) com.mongodb.operation.OperationHelper.access$100(OperationHelper.java:61) com.mongodb.operation.OperationHelper$AsyncCallableWithConnectionAndSourceCallback.onResult(OperationHelper.java:543) com.mongodb.operation.OperationHelper$AsyncCallableWithConnectionAndSourceCallback.onResult(OperationHelper.java:531) com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) com.mongodb.async.client.ClientSessionBinding$2.onResult(ClientSessionBinding.java:76) com.mongodb.async.client.ClientSessionBinding$2.onResult(ClientSessionBinding.java:70) com.mongodb.binding.AsyncClusterBinding$1.onResult(AsyncClusterBinding.java:88) com.mongodb.binding.AsyncClusterBinding$1.onResult(AsyncClusterBinding.java:82) com.mongodb.connection.BaseCluster$ServerSelectionRequest.onResult(BaseCluster.java:421) com.mongodb.connection.BaseCluster.handleServerSelectionRequest(BaseCluster.java:285) com.mongodb.connection.BaseCluster.selectServerAsync(BaseCluster.java:145) com.mongodb.binding.AsyncClusterBinding.getAsyncClusterBindingConnectionSource(AsyncClusterBinding.java:82) com.mongodb.binding.AsyncClusterBinding.getReadConnectionSource(AsyncClusterBinding.java:72) com.mongodb.async.client.ClientSessionBinding.getReadConnectionSource(ClientSessionBinding.java:70) com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:490) com.mongodb.operation.FindOperation.executeAsync(FindOperation.java:747) com.mongodb.async.client.AsyncOperationExecutorImpl$1.onResult(AsyncOperationExecutorImpl.java:67) com.mongodb.async.client.AsyncOperationExecutorImpl$1.onResult(AsyncOperationExecutorImpl.java:59) com.mongodb.async.client.ClientSessionHelper.createClientSession(ClientSessionHelper.java:61) com.mongodb.async.client.ClientSessionHelper.withClientSession(ClientSessionHelper.java:49) com.mongodb.async.client.AsyncOperationExecutorImpl.execute(AsyncOperationExecutorImpl.java:59) com.mongodb.async.client.FindIterableImpl.first(FindIterableImpl.java:197) org.mongodb.scala.FindObservable$$anonfun$first$1.apply(FindObservable.scala:46) org.mongodb.scala.FindObservable$$anonfun$first$1.apply(FindObservable.scala:46) org.mongodb.scala.internal.ObservableHelper$$anon$1.apply(ObservableHelper.scala:36) org.mongodb.scala.internal.ObservableHelper$$anon$1.apply(ObservableHelper.scala:35) com.mongodb.async.client.SingleResultCallbackSubscription.requestInitialData(SingleResultCallbackSubscription.java:38) com.mongodb.async.client.AbstractSubscription.tryRequestInitialData(AbstractSubscription.java:153) com.mongodb.async.client.AbstractSubscription.request(AbstractSubscription.java:84) org.mongodb.scala.ObservableImplicits$BoxedSubscription.request(ObservableImplicits.scala:474) org.mongodb.scala.internal.FoldLeftObservable$$anon$1$$anon$2.request(FoldLeftObservable.scala:42) org.mongodb.scala.ObservableImplicits$ScalaObservable$$anon$1.onSubscribe(ObservableImplicits.scala:94) org.mongodb.scala.ObservableImplicits$ToSingleObservable$$anon$3.onSubscribe(ObservableImplicits.scala:440) org.mongodb.scala.internal.MapObservable$$anon$1.onSubscribe(MapObservable.scala:28) org.mongodb.scala.internal.SubscriptionCheckingObserver.onSubscribe(SubscriptionCheckingObserver.scala:28) org.mongodb.scala.internal.FoldLeftObservable$$anon$1.onSubscribe(FoldLeftObservable.scala:47) org.mongodb.scala.internal.SubscriptionCheckingObserver.onSubscribe(SubscriptionCheckingObserver.scala:28) org.mongodb.scala.internal.MapObservable$$anon$1.onSubscribe(MapObservable.scala:28) org.mongodb.scala.internal.SubscriptionCheckingObserver.onSubscribe(SubscriptionCheckingObserver.scala:28) org.mongodb.scala.ObservableImplicits$ToSingleObservable$$anon$3.onSubscribe(ObservableImplicits.scala:440) org.mongodb.scala.Observer$class.onSubscribe(Observer.scala:85) org.mongodb.scala.ObservableImplicits$ToSingleObservable$$anon$3.onSubscribe(ObservableImplicits.scala:432) com.mongodb.async.client.SingleResultCallbackSubscription.(SingleResultCallbackSubscription.java:33) com.mongodb.async.client.Observables$2.subscribe(Observables.java:76) org.mongodb.scala.ObservableImplicits$BoxedObservable.subscribe(ObservableImplicits.scala:458) org.mongodb.scala.ObservableImplicits$ToSingleObservable.subscribe(ObservableImplicits.scala:431) org.mongodb.scala.internal.MapObservable.subscribe(MapObservable.scala:24) org.mongodb.scala.internal.FoldLeftObservable.subscribe(FoldLeftObservable.scala:26) org.mongodb.scala.internal.MapObservable.subscribe(MapObservable.scala:24) org.mongodb.scala.ObservableImplicits$ToSingleObservable.subscribe(ObservableImplicits.scala:431) org.mongodb.scala.ObservableImplicits$ScalaObservable.subscribe(ObservableImplicits.scala:93) org.mongodb.scala.ObservableImplicits$ScalaObservable.subscribe(ObservableImplicits.scala:73) org.mongodb.scala.ObservableImplicits$ScalaObservable.toFuture(ObservableImplicits.scala:340) com.besterdesigns.bc.rest.database.MetaModel$class.findById(MetaModel.scala:100) com.besterdesigns.bc.rest.database.domain.Devices$.findById(Devices.scala:52) com.besterdesigns.bc.rest.api.DeviceService$$anonfun$2$$anonfun$apply$3$$anonfun$apply$113$$anonfun$apply$114$$anonfun$apply$115$$anonfun$apply$116$$anonfun$apply$117.apply(DeviceService.scala:362) com.besterdesigns.bc.rest.api.DeviceService$$anonfun$2$$anonfun$apply$3$$anonfun$apply$113$$anonfun$apply$114$$anonfun$apply$115$$anonfun$apply$116$$anonfun$apply$117.apply(DeviceService.scala:362) akka.http.scaladsl.server.directives.FutureDirectives$$anonfun$onComplete$1$$anonfun$apply$1.apply(FutureDirectives.scala:37) akka.http.scaladsl.server.directives.FutureDirectives$$anonfun$onComplete$1$$anonfun$apply$1.apply(FutureDirectives.scala:35) akka.http.scaladsl.server.directives.OnSuccessMagnet$$anon$1$$anonfun$1$$anonfun$apply$4$$anonfun$apply$5.apply(FutureDirectives.scala:97) akka.http.scaladsl.server.directives.OnSuccessMagnet$$anon$1$$anonfun$1$$anonfun$apply$4$$anonfun$apply$5.apply(FutureDirectives.scala:97) akka.http.scaladsl.util.FastFuture$.akka$http$scaladsl$util$FastFuture$$strictTransform$1(FastFuture.scala:41) akka.http.scaladsl.util.FastFuture$$anonfun$transformWith$extension1$1.apply(FastFuture.scala:51) akka.http.scaladsl.util.FastFuture$$anonfun$transformWith$extension1$1.apply(FastFuture.scala:50) scala.concurrent.impl.CallbackRunnable.run(Promise.scala:36) akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55) akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:91) akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:90) akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39) akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:415) scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) #3: io.netty.buffer.AdvancedLeakAwareByteBuf.readBytes(AdvancedLeakAwareByteBuf.java:460) com.mongodb.connection.netty.NettyByteBuf.get(NettyByteBuf.java:147) com.mongodb.connection.SnappyCompressor.copy(SnappyCompressor.java:70) com.mongodb.connection.SnappyCompressor.compress(SnappyCompressor.java:47) com.mongodb.connection.CompressedMessage.encodeMessageBodyWithMetadata(CompressedMessage.java:49) com.mongodb.connection.RequestMessage.encode(RequestMessage.java:138) com.mongodb.connection.InternalStreamConnection.sendAndReceiveAsync(InternalStreamConnection.java:323) com.mongodb.connection.UsageTrackingInternalConnection.sendAndReceiveAsync(UsageTrackingInternalConnection.java:113) com.mongodb.connection.DefaultConnectionPool$PooledConnection.sendAndReceiveAsync(DefaultConnectionPool.java:452) com.mongodb.connection.CommandProtocolImpl.executeAsync(CommandProtocolImpl.java:76) com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.executeAsync(DefaultServer.java:203) com.mongodb.connection.DefaultServerConnection.executeProtocolAsync(DefaultServerConnection.java:280) com.mongodb.connection.DefaultServerConnection.commandAsync(DefaultServerConnection.java:151) com.mongodb.connection.DefaultServerConnection.commandAsync(DefaultServerConnection.java:142) com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocolAsync(CommandOperationHelper.java:380) com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocolAsync(CommandOperationHelper.java:282) com.mongodb.operation.FindOperation$2$1.call(FindOperation.java:765) com.mongodb.operation.OperationHelper$5.call(OperationHelper.java:236) com.mongodb.operation.OperationHelper.validateCollation(OperationHelper.java:135) com.mongodb.operation.OperationHelper$4.call(OperationHelper.java:224) com.mongodb.operation.OperationHelper.validateReadConcern(OperationHelper.java:94) com.mongodb.operation.OperationHelper.validateReadConcernAndCollation(OperationHelper.java:218) com.mongodb.operation.OperationHelper.validateReadConcernAndCollation(OperationHelper.java:233) com.mongodb.operation.FindOperation$2.call(FindOperation.java:757) com.mongodb.operation.OperationHelper$7.onResult(OperationHelper.java:526) com.mongodb.operation.OperationHelper$7.onResult(OperationHelper.java:523) com.mongodb.connection.DefaultServer$1.onResult(DefaultServer.java:102) com.mongodb.connection.DefaultServer$1.onResult(DefaultServer.java:93) com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) com.mongodb.connection.DefaultConnectionPool.openAsync(DefaultConnectionPool.java:189) com.mongodb.connection.DefaultConnectionPool.getAsync(DefaultConnectionPool.java:146) com.mongodb.connection.DefaultServer.getConnectionAsync(DefaultServer.java:93) com.mongodb.binding.AsyncClusterBinding$AsyncClusterBindingConnectionSource.getConnection(AsyncClusterBinding.java:114) com.mongodb.async.client.ClientSessionBinding$SessionBindingAsyncConnectionSource.getConnection(ClientSessionBinding.java:124) com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:523) com.mongodb.operation.OperationHelper.access$100(OperationHelper.java:61) com.mongodb.operation.OperationHelper$AsyncCallableWithConnectionAndSourceCallback.onResult(OperationHelper.java:543) com.mongodb.operation.OperationHelper$AsyncCallableWithConnectionAndSourceCallback.onResult(OperationHelper.java:531) com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) com.mongodb.async.client.ClientSessionBinding$2.onResult(ClientSessionBinding.java:76) com.mongodb.async.client.ClientSessionBinding$2.onResult(ClientSessionBinding.java:70) com.mongodb.binding.AsyncClusterBinding$1.onResult(AsyncClusterBinding.java:88) com.mongodb.binding.AsyncClusterBinding$1.onResult(AsyncClusterBinding.java:82) com.mongodb.connection.BaseCluster$ServerSelectionRequest.onResult(BaseCluster.java:421) com.mongodb.connection.BaseCluster.handleServerSelectionRequest(BaseCluster.java:285) com.mongodb.connection.BaseCluster.selectServerAsync(BaseCluster.java:145) com.mongodb.binding.AsyncClusterBinding.getAsyncClusterBindingConnectionSource(AsyncClusterBinding.java:82) com.mongodb.binding.AsyncClusterBinding.getReadConnectionSource(AsyncClusterBinding.java:72) com.mongodb.async.client.ClientSessionBinding.getReadConnectionSource(ClientSessionBinding.java:70) com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:490) com.mongodb.operation.FindOperation.executeAsync(FindOperation.java:747) com.mongodb.async.client.AsyncOperationExecutorImpl$1.onResult(AsyncOperationExecutorImpl.java:67) com.mongodb.async.client.AsyncOperationExecutorImpl$1.onResult(AsyncOperationExecutorImpl.java:59) com.mongodb.async.client.ClientSessionHelper.createClientSession(ClientSessionHelper.java:61) com.mongodb.async.client.ClientSessionHelper.withClientSession(ClientSessionHelper.java:49) com.mongodb.async.client.AsyncOperationExecutorImpl.execute(AsyncOperationExecutorImpl.java:59) com.mongodb.async.client.FindIterableImpl.first(FindIterableImpl.java:197) org.mongodb.scala.FindObservable$$anonfun$first$1.apply(FindObservable.scala:46) org.mongodb.scala.FindObservable$$anonfun$first$1.apply(FindObservable.scala:46) org.mongodb.scala.internal.ObservableHelper$$anon$1.apply(ObservableHelper.scala:36) org.mongodb.scala.internal.ObservableHelper$$anon$1.apply(ObservableHelper.scala:35) com.mongodb.async.client.SingleResultCallbackSubscription.requestInitialData(SingleResultCallbackSubscription.java:38) com.mongodb.async.client.AbstractSubscription.tryRequestInitialData(AbstractSubscription.java:153) com.mongodb.async.client.AbstractSubscription.request(AbstractSubscription.java:84) org.mongodb.scala.ObservableImplicits$BoxedSubscription.request(ObservableImplicits.scala:474) org.mongodb.scala.internal.FoldLeftObservable$$anon$1$$anon$2.request(FoldLeftObservable.scala:42) org.mongodb.scala.ObservableImplicits$ScalaObservable$$anon$1.onSubscribe(ObservableImplicits.scala:94) org.mongodb.scala.ObservableImplicits$ToSingleObservable$$anon$3.onSubscribe(ObservableImplicits.scala:440) org.mongodb.scala.internal.MapObservable$$anon$1.onSubscribe(MapObservable.scala:28) org.mongodb.scala.internal.SubscriptionCheckingObserver.onSubscribe(SubscriptionCheckingObserver.scala:28) org.mongodb.scala.internal.FoldLeftObservable$$anon$1.onSubscribe(FoldLeftObservable.scala:47) org.mongodb.scala.internal.SubscriptionCheckingObserver.onSubscribe(SubscriptionCheckingObserver.scala:28) org.mongodb.scala.internal.MapObservable$$anon$1.onSubscribe(MapObservable.scala:28) org.mongodb.scala.internal.SubscriptionCheckingObserver.onSubscribe(SubscriptionCheckingObserver.scala:28) org.mongodb.scala.ObservableImplicits$ToSingleObservable$$anon$3.onSubscribe(ObservableImplicits.scala:440) org.mongodb.scala.Observer$class.onSubscribe(Observer.scala:85) org.mongodb.scala.ObservableImplicits$ToSingleObservable$$anon$3.onSubscribe(ObservableImplicits.scala:432) com.mongodb.async.client.SingleResultCallbackSubscription.(SingleResultCallbackSubscription.java:33) com.mongodb.async.client.Observables$2.subscribe(Observables.java:76) org.mongodb.scala.ObservableImplicits$BoxedObservable.subscribe(ObservableImplicits.scala:458) org.mongodb.scala.ObservableImplicits$ToSingleObservable.subscribe(ObservableImplicits.scala:431) org.mongodb.scala.internal.MapObservable.subscribe(MapObservable.scala:24) org.mongodb.scala.internal.FoldLeftObservable.subscribe(FoldLeftObservable.scala:26) org.mongodb.scala.internal.MapObservable.subscribe(MapObservable.scala:24) org.mongodb.scala.ObservableImplicits$ToSingleObservable.subscribe(ObservableImplicits.scala:431) org.mongodb.scala.ObservableImplicits$ScalaObservable.subscribe(ObservableImplicits.scala:93) org.mongodb.scala.ObservableImplicits$ScalaObservable.subscribe(ObservableImplicits.scala:73) org.mongodb.scala.ObservableImplicits$ScalaObservable.toFuture(ObservableImplicits.scala:340) com.besterdesigns.bc.rest.database.MetaModel$class.findById(MetaModel.scala:100) com.besterdesigns.bc.rest.database.domain.Devices$.findById(Devices.scala:52) com.besterdesigns.bc.rest.api.DeviceService$$anonfun$2$$anonfun$apply$3$$anonfun$apply$113$$anonfun$apply$114$$anonfun$apply$115$$anonfun$apply$116$$anonfun$apply$117.apply(DeviceService.scala:362) com.besterdesigns.bc.rest.api.DeviceService$$anonfun$2$$anonfun$apply$3$$anonfun$apply$113$$anonfun$apply$114$$anonfun$apply$115$$anonfun$apply$116$$anonfun$apply$117.apply(DeviceService.scala:362) akka.http.scaladsl.server.directives.FutureDirectives$$anonfun$onComplete$1$$anonfun$apply$1.apply(FutureDirectives.scala:37) akka.http.scaladsl.server.directives.FutureDirectives$$anonfun$onComplete$1$$anonfun$apply$1.apply(FutureDirectives.scala:35) akka.http.scaladsl.server.directives.OnSuccessMagnet$$anon$1$$anonfun$1$$anonfun$apply$4$$anonfun$apply$5.apply(FutureDirectives.scala:97) akka.http.scaladsl.server.directives.OnSuccessMagnet$$anon$1$$anonfun$1$$anonfun$apply$4$$anonfun$apply$5.apply(FutureDirectives.scala:97) akka.http.scaladsl.util.FastFuture$.akka$http$scaladsl$util$FastFuture$$strictTransform$1(FastFuture.scala:41) akka.http.scaladsl.util.FastFuture$$anonfun$transformWith$extension1$1.apply(FastFuture.scala:51) akka.http.scaladsl.util.FastFuture$$anonfun$transformWith$extension1$1.apply(FastFuture.scala:50) scala.concurrent.impl.CallbackRunnable.run(Promise.scala:36) akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55) akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:91) akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:90) akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39) akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:415) scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) #2: io.netty.buffer.AdvancedLeakAwareByteBuf.getInt(AdvancedLeakAwareByteBuf.java:160) com.mongodb.connection.netty.NettyByteBuf.getInt(NettyByteBuf.java:184) com.mongodb.connection.CompressedMessage.getWrappedMessageSize(CompressedMessage.java:56) com.mongodb.connection.CompressedMessage.encodeMessageBodyWithMetadata(CompressedMessage.java:43) com.mongodb.connection.RequestMessage.encode(RequestMessage.java:138) com.mongodb.connection.InternalStreamConnection.sendAndReceiveAsync(InternalStreamConnection.java:323) com.mongodb.connection.UsageTrackingInternalConnection.sendAndReceiveAsync(UsageTrackingInternalConnection.java:113) com.mongodb.connection.DefaultConnectionPool$PooledConnection.sendAndReceiveAsync(DefaultConnectionPool.java:452) com.mongodb.connection.CommandProtocolImpl.executeAsync(CommandProtocolImpl.java:76) com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.executeAsync(DefaultServer.java:203) com.mongodb.connection.DefaultServerConnection.executeProtocolAsync(DefaultServerConnection.java:280) com.mongodb.connection.DefaultServerConnection.commandAsync(DefaultServerConnection.java:151) com.mongodb.connection.DefaultServerConnection.commandAsync(DefaultServerConnection.java:142) com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocolAsync(CommandOperationHelper.java:380) com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocolAsync(CommandOperationHelper.java:282) com.mongodb.operation.FindOperation$2$1.call(FindOperation.java:765) com.mongodb.operation.OperationHelper$5.call(OperationHelper.java:236) com.mongodb.operation.OperationHelper.validateCollation(OperationHelper.java:135) com.mongodb.operation.OperationHelper$4.call(OperationHelper.java:224) com.mongodb.operation.OperationHelper.validateReadConcern(OperationHelper.java:94) com.mongodb.operation.OperationHelper.validateReadConcernAndCollation(OperationHelper.java:218) com.mongodb.operation.OperationHelper.validateReadConcernAndCollation(OperationHelper.java:233) com.mongodb.operation.FindOperation$2.call(FindOperation.java:757) com.mongodb.operation.OperationHelper$7.onResult(OperationHelper.java:526) com.mongodb.operation.OperationHelper$7.onResult(OperationHelper.java:523) com.mongodb.connection.DefaultServer$1.onResult(DefaultServer.java:102) com.mongodb.connection.DefaultServer$1.onResult(DefaultServer.java:93) com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) com.mongodb.connection.DefaultConnectionPool.openAsync(DefaultConnectionPool.java:189) com.mongodb.connection.DefaultConnectionPool.getAsync(DefaultConnectionPool.java:146) com.mongodb.connection.DefaultServer.getConnectionAsync(DefaultServer.java:93) com.mongodb.binding.AsyncClusterBinding$AsyncClusterBindingConnectionSource.getConnection(AsyncClusterBinding.java:114) com.mongodb.async.client.ClientSessionBinding$SessionBindingAsyncConnectionSource.getConnection(ClientSessionBinding.java:124) com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:523) com.mongodb.operation.OperationHelper.access$100(OperationHelper.java:61) com.mongodb.operation.OperationHelper$AsyncCallableWithConnectionAndSourceCallback.onResult(OperationHelper.java:543) com.mongodb.operation.OperationHelper$AsyncCallableWithConnectionAndSourceCallback.onResult(OperationHelper.java:531) com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) com.mongodb.async.client.ClientSessionBinding$2.onResult(ClientSessionBinding.java:76) com.mongodb.async.client.ClientSessionBinding$2.onResult(ClientSessionBinding.java:70) com.mongodb.binding.AsyncClusterBinding$1.onResult(AsyncClusterBinding.java:88) com.mongodb.binding.AsyncClusterBinding$1.onResult(AsyncClusterBinding.java:82) com.mongodb.connection.BaseCluster$ServerSelectionRequest.onResult(BaseCluster.java:421) com.mongodb.connection.BaseCluster.handleServerSelectionRequest(BaseCluster.java:285) com.mongodb.connection.BaseCluster.selectServerAsync(BaseCluster.java:145) com.mongodb.binding.AsyncClusterBinding.getAsyncClusterBindingConnectionSource(AsyncClusterBinding.java:82) com.mongodb.binding.AsyncClusterBinding.getReadConnectionSource(AsyncClusterBinding.java:72) com.mongodb.async.client.ClientSessionBinding.getReadConnectionSource(ClientSessionBinding.java:70) com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:490) com.mongodb.operation.FindOperation.executeAsync(FindOperation.java:747) com.mongodb.async.client.AsyncOperationExecutorImpl$1.onResult(AsyncOperationExecutorImpl.java:67) com.mongodb.async.client.AsyncOperationExecutorImpl$1.onResult(AsyncOperationExecutorImpl.java:59) com.mongodb.async.client.ClientSessionHelper.createClientSession(ClientSessionHelper.java:61) com.mongodb.async.client.ClientSessionHelper.withClientSession(ClientSessionHelper.java:49) com.mongodb.async.client.AsyncOperationExecutorImpl.execute(AsyncOperationExecutorImpl.java:59) com.mongodb.async.client.FindIterableImpl.first(FindIterableImpl.java:197) org.mongodb.scala.FindObservable$$anonfun$first$1.apply(FindObservable.scala:46) org.mongodb.scala.FindObservable$$anonfun$first$1.apply(FindObservable.scala:46) org.mongodb.scala.internal.ObservableHelper$$anon$1.apply(ObservableHelper.scala:36) org.mongodb.scala.internal.ObservableHelper$$anon$1.apply(ObservableHelper.scala:35) com.mongodb.async.client.SingleResultCallbackSubscription.requestInitialData(SingleResultCallbackSubscription.java:38) com.mongodb.async.client.AbstractSubscription.tryRequestInitialData(AbstractSubscription.java:153) com.mongodb.async.client.AbstractSubscription.request(AbstractSubscription.java:84) org.mongodb.scala.ObservableImplicits$BoxedSubscription.request(ObservableImplicits.scala:474) org.mongodb.scala.internal.FoldLeftObservable$$anon$1$$anon$2.request(FoldLeftObservable.scala:42) org.mongodb.scala.ObservableImplicits$ScalaObservable$$anon$1.onSubscribe(ObservableImplicits.scala:94) org.mongodb.scala.ObservableImplicits$ToSingleObservable$$anon$3.onSubscribe(ObservableImplicits.scala:440) org.mongodb.scala.internal.MapObservable$$anon$1.onSubscribe(MapObservable.scala:28) org.mongodb.scala.internal.SubscriptionCheckingObserver.onSubscribe(SubscriptionCheckingObserver.scala:28) org.mongodb.scala.internal.FoldLeftObservable$$anon$1.onSubscribe(FoldLeftObservable.scala:47) org.mongodb.scala.internal.SubscriptionCheckingObserver.onSubscribe(SubscriptionCheckingObserver.scala:28) org.mongodb.scala.internal.MapObservable$$anon$1.onSubscribe(MapObservable.scala:28) org.mongodb.scala.internal.SubscriptionCheckingObserver.onSubscribe(SubscriptionCheckingObserver.scala:28) org.mongodb.scala.ObservableImplicits$ToSingleObservable$$anon$3.onSubscribe(ObservableImplicits.scala:440) org.mongodb.scala.Observer$class.onSubscribe(Observer.scala:85) org.mongodb.scala.ObservableImplicits$ToSingleObservable$$anon$3.onSubscribe(ObservableImplicits.scala:432) com.mongodb.async.client.SingleResultCallbackSubscription.(SingleResultCallbackSubscription.java:33) com.mongodb.async.client.Observables$2.subscribe(Observables.java:76) org.mongodb.scala.ObservableImplicits$BoxedObservable.subscribe(ObservableImplicits.scala:458) org.mongodb.scala.ObservableImplicits$ToSingleObservable.subscribe(ObservableImplicits.scala:431) org.mongodb.scala.internal.MapObservable.subscribe(MapObservable.scala:24) org.mongodb.scala.internal.FoldLeftObservable.subscribe(FoldLeftObservable.scala:26) org.mongodb.scala.internal.MapObservable.subscribe(MapObservable.scala:24) org.mongodb.scala.ObservableImplicits$ToSingleObservable.subscribe(ObservableImplicits.scala:431) org.mongodb.scala.ObservableImplicits$ScalaObservable.subscribe(ObservableImplicits.scala:93) org.mongodb.scala.ObservableImplicits$ScalaObservable.subscribe(ObservableImplicits.scala:73) org.mongodb.scala.ObservableImplicits$ScalaObservable.toFuture(ObservableImplicits.scala:340) com.besterdesigns.bc.rest.database.MetaModel$class.findById(MetaModel.scala:100) com.besterdesigns.bc.rest.database.domain.Devices$.findById(Devices.scala:52) com.besterdesigns.bc.rest.api.DeviceService$$anonfun$2$$anonfun$apply$3$$anonfun$apply$113$$anonfun$apply$114$$anonfun$apply$115$$anonfun$apply$116$$anonfun$apply$117.apply(DeviceService.scala:362) com.besterdesigns.bc.rest.api.DeviceService$$anonfun$2$$anonfun$apply$3$$anonfun$apply$113$$anonfun$apply$114$$anonfun$apply$115$$anonfun$apply$116$$anonfun$apply$117.apply(DeviceService.scala:362) akka.http.scaladsl.server.directives.FutureDirectives$$anonfun$onComplete$1$$anonfun$apply$1.apply(FutureDirectives.scala:37) akka.http.scaladsl.server.directives.FutureDirectives$$anonfun$onComplete$1$$anonfun$apply$1.apply(FutureDirectives.scala:35) akka.http.scaladsl.server.directives.OnSuccessMagnet$$anon$1$$anonfun$1$$anonfun$apply$4$$anonfun$apply$5.apply(FutureDirectives.scala:97) akka.http.scaladsl.server.directives.OnSuccessMagnet$$anon$1$$anonfun$1$$anonfun$apply$4$$anonfun$apply$5.apply(FutureDirectives.scala:97) akka.http.scaladsl.util.FastFuture$.akka$http$scaladsl$util$FastFuture$$strictTransform$1(FastFuture.scala:41) akka.http.scaladsl.util.FastFuture$$anonfun$transformWith$extension1$1.apply(FastFuture.scala:51) akka.http.scaladsl.util.FastFuture$$anonfun$transformWith$extension1$1.apply(FastFuture.scala:50) scala.concurrent.impl.CallbackRunnable.run(Promise.scala:36) akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55) akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:91) akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:90) akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39) akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:415) scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) #1: io.netty.buffer.AdvancedLeakAwareByteBuf.getInt(AdvancedLeakAwareByteBuf.java:160) com.mongodb.connection.netty.NettyByteBuf.getInt(NettyByteBuf.java:184) com.mongodb.connection.CompressedMessage.getWrappedMessageRequestId(CompressedMessage.java:61) com.mongodb.connection.CompressedMessage.(CompressedMessage.java:34) com.mongodb.connection.InternalStreamConnection.sendAndReceiveAsync(InternalStreamConnection.java:322) com.mongodb.connection.UsageTrackingInternalConnection.sendAndReceiveAsync(UsageTrackingInternalConnection.java:113) com.mongodb.connection.DefaultConnectionPool$PooledConnection.sendAndReceiveAsync(DefaultConnectionPool.java:452) com.mongodb.connection.CommandProtocolImpl.executeAsync(CommandProtocolImpl.java:76) com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.executeAsync(DefaultServer.java:203) com.mongodb.connection.DefaultServerConnection.executeProtocolAsync(DefaultServerConnection.java:280) com.mongodb.connection.DefaultServerConnection.commandAsync(DefaultServerConnection.java:151) com.mongodb.connection.DefaultServerConnection.commandAsync(DefaultServerConnection.java:142) com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocolAsync(CommandOperationHelper.java:380) com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocolAsync(CommandOperationHelper.java:282) com.mongodb.operation.FindOperation$2$1.call(FindOperation.java:765) com.mongodb.operation.OperationHelper$5.call(OperationHelper.java:236) com.mongodb.operation.OperationHelper.validateCollation(OperationHelper.java:135) com.mongodb.operation.OperationHelper$4.call(OperationHelper.java:224) com.mongodb.operation.OperationHelper.validateReadConcern(OperationHelper.java:94) com.mongodb.operation.OperationHelper.validateReadConcernAndCollation(OperationHelper.java:218) com.mongodb.operation.OperationHelper.validateReadConcernAndCollation(OperationHelper.java:233) com.mongodb.operation.FindOperation$2.call(FindOperation.java:757) com.mongodb.operation.OperationHelper$7.onResult(OperationHelper.java:526) com.mongodb.operation.OperationHelper$7.onResult(OperationHelper.java:523) com.mongodb.connection.DefaultServer$1.onResult(DefaultServer.java:102) com.mongodb.connection.DefaultServer$1.onResult(DefaultServer.java:93) com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) com.mongodb.connection.DefaultConnectionPool.openAsync(DefaultConnectionPool.java:189) com.mongodb.connection.DefaultConnectionPool.getAsync(DefaultConnectionPool.java:146) com.mongodb.connection.DefaultServer.getConnectionAsync(DefaultServer.java:93) com.mongodb.binding.AsyncClusterBinding$AsyncClusterBindingConnectionSource.getConnection(AsyncClusterBinding.java:114) com.mongodb.async.client.ClientSessionBinding$SessionBindingAsyncConnectionSource.getConnection(ClientSessionBinding.java:124) com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:523) com.mongodb.operation.OperationHelper.access$100(OperationHelper.java:61) com.mongodb.operation.OperationHelper$AsyncCallableWithConnectionAndSourceCallback.onResult(OperationHelper.java:543) com.mongodb.operation.OperationHelper$AsyncCallableWithConnectionAndSourceCallback.onResult(OperationHelper.java:531) com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) com.mongodb.async.client.ClientSessionBinding$2.onResult(ClientSessionBinding.java:76) com.mongodb.async.client.ClientSessionBinding$2.onResult(ClientSessionBinding.java:70) com.mongodb.binding.AsyncClusterBinding$1.onResult(AsyncClusterBinding.java:88) com.mongodb.binding.AsyncClusterBinding$1.onResult(AsyncClusterBinding.java:82) com.mongodb.connection.BaseCluster$ServerSelectionRequest.onResult(BaseCluster.java:421) com.mongodb.connection.BaseCluster.handleServerSelectionRequest(BaseCluster.java:285) com.mongodb.connection.BaseCluster.selectServerAsync(BaseCluster.java:145) com.mongodb.binding.AsyncClusterBinding.getAsyncClusterBindingConnectionSource(AsyncClusterBinding.java:82) com.mongodb.binding.AsyncClusterBinding.getReadConnectionSource(AsyncClusterBinding.java:72) com.mongodb.async.client.ClientSessionBinding.getReadConnectionSource(ClientSessionBinding.java:70) com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:490) com.mongodb.operation.FindOperation.executeAsync(FindOperation.java:747) com.mongodb.async.client.AsyncOperationExecutorImpl$1.onResult(AsyncOperationExecutorImpl.java:67) com.mongodb.async.client.AsyncOperationExecutorImpl$1.onResult(AsyncOperationExecutorImpl.java:59) com.mongodb.async.client.ClientSessionHelper.createClientSession(ClientSessionHelper.java:61) com.mongodb.async.client.ClientSessionHelper.withClientSession(ClientSessionHelper.java:49) com.mongodb.async.client.AsyncOperationExecutorImpl.execute(AsyncOperationExecutorImpl.java:59) com.mongodb.async.client.FindIterableImpl.first(FindIterableImpl.java:197) org.mongodb.scala.FindObservable$$anonfun$first$1.apply(FindObservable.scala:46) org.mongodb.scala.FindObservable$$anonfun$first$1.apply(FindObservable.scala:46) org.mongodb.scala.internal.ObservableHelper$$anon$1.apply(ObservableHelper.scala:36) org.mongodb.scala.internal.ObservableHelper$$anon$1.apply(ObservableHelper.scala:35) com.mongodb.async.client.SingleResultCallbackSubscription.requestInitialData(SingleResultCallbackSubscription.java:38) com.mongodb.async.client.AbstractSubscription.tryRequestInitialData(AbstractSubscription.java:153) com.mongodb.async.client.AbstractSubscription.request(AbstractSubscription.java:84) org.mongodb.scala.ObservableImplicits$BoxedSubscription.request(ObservableImplicits.scala:474) org.mongodb.scala.internal.FoldLeftObservable$$anon$1$$anon$2.request(FoldLeftObservable.scala:42) org.mongodb.scala.ObservableImplicits$ScalaObservable$$anon$1.onSubscribe(ObservableImplicits.scala:94) org.mongodb.scala.ObservableImplicits$ToSingleObservable$$anon$3.onSubscribe(ObservableImplicits.scala:440) org.mongodb.scala.internal.MapObservable$$anon$1.onSubscribe(MapObservable.scala:28) org.mongodb.scala.internal.SubscriptionCheckingObserver.onSubscribe(SubscriptionCheckingObserver.scala:28) org.mongodb.scala.internal.FoldLeftObservable$$anon$1.onSubscribe(FoldLeftObservable.scala:47) org.mongodb.scala.internal.SubscriptionCheckingObserver.onSubscribe(SubscriptionCheckingObserver.scala:28) org.mongodb.scala.internal.MapObservable$$anon$1.onSubscribe(MapObservable.scala:28) org.mongodb.scala.internal.SubscriptionCheckingObserver.onSubscribe(SubscriptionCheckingObserver.scala:28) org.mongodb.scala.ObservableImplicits$ToSingleObservable$$anon$3.onSubscribe(ObservableImplicits.scala:440) org.mongodb.scala.Observer$class.onSubscribe(Observer.scala:85) org.mongodb.scala.ObservableImplicits$ToSingleObservable$$anon$3.onSubscribe(ObservableImplicits.scala:432) com.mongodb.async.client.SingleResultCallbackSubscription.(SingleResultCallbackSubscription.java:33) com.mongodb.async.client.Observables$2.subscribe(Observables.java:76) org.mongodb.scala.ObservableImplicits$BoxedObservable.subscribe(ObservableImplicits.scala:458) org.mongodb.scala.ObservableImplicits$ToSingleObservable.subscribe(ObservableImplicits.scala:431) org.mongodb.scala.internal.MapObservable.subscribe(MapObservable.scala:24) org.mongodb.scala.internal.FoldLeftObservable.subscribe(FoldLeftObservable.scala:26) org.mongodb.scala.internal.MapObservable.subscribe(MapObservable.scala:24) org.mongodb.scala.ObservableImplicits$ToSingleObservable.subscribe(ObservableImplicits.scala:431) org.mongodb.scala.ObservableImplicits$ScalaObservable.subscribe(ObservableImplicits.scala:93) org.mongodb.scala.ObservableImplicits$ScalaObservable.subscribe(ObservableImplicits.scala:73) org.mongodb.scala.ObservableImplicits$ScalaObservable.toFuture(ObservableImplicits.scala:340) com.besterdesigns.bc.rest.database.MetaModel$class.findById(MetaModel.scala:100) com.besterdesigns.bc.rest.database.domain.Devices$.findById(Devices.scala:52) com.besterdesigns.bc.rest.api.DeviceService$$anonfun$2$$anonfun$apply$3$$anonfun$apply$113$$anonfun$apply$114$$anonfun$apply$115$$anonfun$apply$116$$anonfun$apply$117.apply(DeviceService.scala:362) com.besterdesigns.bc.rest.api.DeviceService$$anonfun$2$$anonfun$apply$3$$anonfun$apply$113$$anonfun$apply$114$$anonfun$apply$115$$anonfun$apply$116$$anonfun$apply$117.apply(DeviceService.scala:362) akka.http.scaladsl.server.directives.FutureDirectives$$anonfun$onComplete$1$$anonfun$apply$1.apply(FutureDirectives.scala:37) akka.http.scaladsl.server.directives.FutureDirectives$$anonfun$onComplete$1$$anonfun$apply$1.apply(FutureDirectives.scala:35) akka.http.scaladsl.server.directives.OnSuccessMagnet$$anon$1$$anonfun$1$$anonfun$apply$4$$anonfun$apply$5.apply(FutureDirectives.scala:97) akka.http.scaladsl.server.directives.OnSuccessMagnet$$anon$1$$anonfun$1$$anonfun$apply$4$$anonfun$apply$5.apply(FutureDirectives.scala:97) akka.http.scaladsl.util.FastFuture$.akka$http$scaladsl$util$FastFuture$$strictTransform$1(FastFuture.scala:41) akka.http.scaladsl.util.FastFuture$$anonfun$transformWith$extension1$1.apply(FastFuture.scala:51) akka.http.scaladsl.util.FastFuture$$anonfun$transformWith$extension1$1.apply(FastFuture.scala:50) scala.concurrent.impl.CallbackRunnable.run(Promise.scala:36) akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55) akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:91) akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:90) akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39) akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:415) scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) Created at: io.netty.util.ResourceLeakDetector.track(ResourceLeakDetector.java:237) io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:340) io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:179) io.netty.buffer.AbstractByteBufAllocator.buffer(AbstractByteBufAllocator.java:115) com.mongodb.connection.netty.NettyStream.getBuffer(NettyStream.java:94) com.mongodb.connection.InternalStreamConnection.getBuffer(InternalStreamConnection.java:574) com.mongodb.connection.ByteBufferBsonOutput.getByteBufferAtIndex(ByteBufferBsonOutput.java:92) com.mongodb.connection.ByteBufferBsonOutput.getCurrentByteBuffer(ByteBufferBsonOutput.java:81) com.mongodb.connection.ByteBufferBsonOutput.writeByte(ByteBufferBsonOutput.java:76) org.bson.io.OutputBuffer.write(OutputBuffer.java:150) org.bson.io.OutputBuffer.writeInt32(OutputBuffer.java:56) com.mongodb.connection.RequestMessage.writeMessagePrologue(RequestMessage.java:158) com.mongodb.connection.RequestMessage.encode(RequestMessage.java:137) com.mongodb.connection.InternalStreamConnection.sendAndReceiveAsync(InternalStreamConnection.java:312) com.mongodb.connection.UsageTrackingInternalConnection.sendAndReceiveAsync(UsageTrackingInternalConnection.java:113) com.mongodb.connection.DefaultConnectionPool$PooledConnection.sendAndReceiveAsync(DefaultConnectionPool.java:452) com.mongodb.connection.CommandProtocolImpl.executeAsync(CommandProtocolImpl.java:76) com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.executeAsync(DefaultServer.java:203) com.mongodb.connection.DefaultServerConnection.executeProtocolAsync(DefaultServerConnection.java:280) com.mongodb.connection.DefaultServerConnection.commandAsync(DefaultServerConnection.java:151) com.mongodb.connection.DefaultServerConnection.commandAsync(DefaultServerConnection.java:142) com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocolAsync(CommandOperationHelper.java:380) com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocolAsync(CommandOperationHelper.java:282) com.mongodb.operation.FindOperation$2$1.call(FindOperation.java:765) com.mongodb.operation.OperationHelper$5.call(OperationHelper.java:236) com.mongodb.operation.OperationHelper.validateCollation(OperationHelper.java:135) com.mongodb.operation.OperationHelper$4.call(OperationHelper.java:224) com.mongodb.operation.OperationHelper.validateReadConcern(OperationHelper.java:94) com.mongodb.operation.OperationHelper.validateReadConcernAndCollation(OperationHelper.java:218) com.mongodb.operation.OperationHelper.validateReadConcernAndCollation(OperationHelper.java:233) com.mongodb.operation.FindOperation$2.call(FindOperation.java:757) com.mongodb.operation.OperationHelper$7.onResult(OperationHelper.java:526) com.mongodb.operation.OperationHelper$7.onResult(OperationHelper.java:523) com.mongodb.connection.DefaultServer$1.onResult(DefaultServer.java:102) com.mongodb.connection.DefaultServer$1.onResult(DefaultServer.java:93) com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) com.mongodb.connection.DefaultConnectionPool.openAsync(DefaultConnectionPool.java:189) com.mongodb.connection.DefaultConnectionPool.getAsync(DefaultConnectionPool.java:146) com.mongodb.connection.DefaultServer.getConnectionAsync(DefaultServer.java:93) com.mongodb.binding.AsyncClusterBinding$AsyncClusterBindingConnectionSource.getConnection(AsyncClusterBinding.java:114) com.mongodb.async.client.ClientSessionBinding$SessionBindingAsyncConnectionSource.getConnection(ClientSessionBinding.java:124) com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:523) com.mongodb.operation.OperationHelper.access$100(OperationHelper.java:61) com.mongodb.operation.OperationHelper$AsyncCallableWithConnectionAndSourceCallback.onResult(OperationHelper.java:543) com.mongodb.operation.OperationHelper$AsyncCallableWithConnectionAndSourceCallback.onResult(OperationHelper.java:531) com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) com.mongodb.async.client.ClientSessionBinding$2.onResult(ClientSessionBinding.java:76) com.mongodb.async.client.ClientSessionBinding$2.onResult(ClientSessionBinding.java:70) com.mongodb.binding.AsyncClusterBinding$1.onResult(AsyncClusterBinding.java:88) com.mongodb.binding.AsyncClusterBinding$1.onResult(AsyncClusterBinding.java:82) com.mongodb.connection.BaseCluster$ServerSelectionRequest.onResult(BaseCluster.java:421) com.mongodb.connection.BaseCluster.handleServerSelectionRequest(BaseCluster.java:285) com.mongodb.connection.BaseCluster.selectServerAsync(BaseCluster.java:145) com.mongodb.binding.AsyncClusterBinding.getAsyncClusterBindingConnectionSource(AsyncClusterBinding.java:82) com.mongodb.binding.AsyncClusterBinding.getReadConnectionSource(AsyncClusterBinding.java:72) com.mongodb.async.client.ClientSessionBinding.getReadConnectionSource(ClientSessionBinding.java:70) com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:490) com.mongodb.operation.FindOperation.executeAsync(FindOperation.java:747) com.mongodb.async.client.AsyncOperationExecutorImpl$1.onResult(AsyncOperationExecutorImpl.java:67) com.mongodb.async.client.AsyncOperationExecutorImpl$1.onResult(AsyncOperationExecutorImpl.java:59) com.mongodb.async.client.ClientSessionHelper.createClientSession(ClientSessionHelper.java:61) com.mongodb.async.client.ClientSessionHelper.withClientSession(ClientSessionHelper.java:49) com.mongodb.async.client.AsyncOperationExecutorImpl.execute(AsyncOperationExecutorImpl.java:59) com.mongodb.async.client.FindIterableImpl.first(FindIterableImpl.java:197) org.mongodb.scala.FindObservable$$anonfun$first$1.apply(FindObservable.scala:46) org.mongodb.scala.FindObservable$$anonfun$first$1.apply(FindObservable.scala:46) org.mongodb.scala.internal.ObservableHelper$$anon$1.apply(ObservableHelper.scala:36) org.mongodb.scala.internal.ObservableHelper$$anon$1.apply(ObservableHelper.scala:35) com.mongodb.async.client.SingleResultCallbackSubscription.requestInitialData(SingleResultCallbackSubscription.java:38) com.mongodb.async.client.AbstractSubscription.tryRequestInitialData(AbstractSubscription.java:153) com.mongodb.async.client.AbstractSubscription.request(AbstractSubscription.java:84) org.mongodb.scala.ObservableImplicits$BoxedSubscription.request(ObservableImplicits.scala:474) org.mongodb.scala.internal.FoldLeftObservable$$anon$1$$anon$2.request(FoldLeftObservable.scala:42) org.mongodb.scala.ObservableImplicits$ScalaObservable$$anon$1.onSubscribe(ObservableImplicits.scala:94) org.mongodb.scala.ObservableImplicits$ToSingleObservable$$anon$3.onSubscribe(ObservableImplicits.scala:440) org.mongodb.scala.internal.MapObservable$$anon$1.onSubscribe(MapObservable.scala:28) org.mongodb.scala.internal.SubscriptionCheckingObserver.onSubscribe(SubscriptionCheckingObserver.scala:28) org.mongodb.scala.internal.FoldLeftObservable$$anon$1.onSubscribe(FoldLeftObservable.scala:47) org.mongodb.scala.internal.SubscriptionCheckingObserver.onSubscribe(SubscriptionCheckingObserver.scala:28) org.mongodb.scala.internal.MapObservable$$anon$1.onSubscribe(MapObservable.scala:28) org.mongodb.scala.internal.SubscriptionCheckingObserver.onSubscribe(SubscriptionCheckingObserver.scala:28) org.mongodb.scala.ObservableImplicits$ToSingleObservable$$anon$3.onSubscribe(ObservableImplicits.scala:440) org.mongodb.scala.Observer$class.onSubscribe(Observer.scala:85) org.mongodb.scala.ObservableImplicits$ToSingleObservable$$anon$3.onSubscribe(ObservableImplicits.scala:432) com.mongodb.async.client.SingleResultCallbackSubscription.(SingleResultCallbackSubscription.java:33) com.mongodb.async.client.Observables$2.subscribe(Observables.java:76) org.mongodb.scala.ObservableImplicits$BoxedObservable.subscribe(ObservableImplicits.scala:458) org.mongodb.scala.ObservableImplicits$ToSingleObservable.subscribe(ObservableImplicits.scala:431) org.mongodb.scala.internal.MapObservable.subscribe(MapObservable.scala:24) org.mongodb.scala.internal.FoldLeftObservable.subscribe(FoldLeftObservable.scala:26) org.mongodb.scala.internal.MapObservable.subscribe(MapObservable.scala:24) org.mongodb.scala.ObservableImplicits$ToSingleObservable.subscribe(ObservableImplicits.scala:431) org.mongodb.scala.ObservableImplicits$ScalaObservable.subscribe(ObservableImplicits.scala:93) org.mongodb.scala.ObservableImplicits$ScalaObservable.subscribe(ObservableImplicits.scala:73) org.mongodb.scala.ObservableImplicits$ScalaObservable.toFuture(ObservableImplicits.scala:340) com.besterdesigns.bc.rest.database.MetaModel$class.findById(MetaModel.scala:100) com.besterdesigns.bc.rest.database.domain.Devices$.findById(Devices.scala:52) com.besterdesigns.bc.rest.api.DeviceService$$anonfun$2$$anonfun$apply$3$$anonfun$apply$113$$anonfun$apply$114$$anonfun$apply$115$$anonfun$apply$116$$anonfun$apply$117.apply(DeviceService.scala:362) com.besterdesigns.bc.rest.api.DeviceService$$anonfun$2$$anonfun$apply$3$$anonfun$apply$113$$anonfun$apply$114$$anonfun$apply$115$$anonfun$apply$116$$anonfun$apply$117.apply(DeviceService.scala:362) akka.http.scaladsl.server.directives.FutureDirectives$$anonfun$onComplete$1$$anonfun$apply$1.apply(FutureDirectives.scala:37) akka.http.scaladsl.server.directives.FutureDirectives$$anonfun$onComplete$1$$anonfun$apply$1.apply(FutureDirectives.scala:35) akka.http.scaladsl.server.directives.OnSuccessMagnet$$anon$1$$anonfun$1$$anonfun$apply$4$$anonfun$apply$5.apply(FutureDirectives.scala:97) akka.http.scaladsl.server.directives.OnSuccessMagnet$$anon$1$$anonfun$1$$anonfun$apply$4$$anonfun$apply$5.apply(FutureDirectives.scala:97) akka.http.scaladsl.util.FastFuture$.akka$http$scaladsl$util$FastFuture$$strictTransform$1(FastFuture.scala:41) akka.http.scaladsl.util.FastFuture$$anonfun$transformWith$extension1$1.apply(FastFuture.scala:51) akka.http.scaladsl.util.FastFuture$$anonfun$transformWith$extension1$1.apply(FastFuture.scala:50) scala.concurrent.impl.CallbackRunnable.run(Promise.scala:36) akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55) akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:91) akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:90) akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39) akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:415) scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)