You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "mdedetrich (via GitHub)" <gi...@apache.org> on 2024/10/24 11:32:39 UTC

[PR] Fix google cloud keep alive settings [pekko-connectors]

mdedetrich opened a new pull request, #876:
URL: https://github.com/apache/pekko-connectors/pull/876

   So when trying to upload a file to google cloud storage I received the following error
   
   ```
   org.apache.pekko.http.impl.engine.client.OutgoingConnectionBlueprint$UnexpectedConnectionClosureException: The http server closed the connection unexpectedly before delivering responses for 1 outstanding requests
       at org.apache.pekko.http.impl.engine.client.OutgoingConnectionBlueprint$.$anonfun$apply$7(OutgoingConnectionBlueprint.scala:135)
       at org.apache.pekko.http.impl.engine.client.OutgoingConnectionBlueprint$.$anonfun$apply$7$adapted(OutgoingConnectionBlueprint.scala:135)
       at org.apache.pekko.http.impl.util.One2OneBidiFlow$One2OneBidi$$anon$1$$anon$4.onUpstreamFinish(One2OneBidiFlow.scala:112)
       at org.apache.pekko.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:537)
       at org.apache.pekko.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:401)
       at org.apache.pekko.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:662)
       at org.apache.pekko.stream.impl.fusing.ActorGraphInterpreter$SimpleBoundaryEvent.execute(ActorGraphInterpreter.scala:71)
       at org.apache.pekko.stream.impl.fusing.ActorGraphInterpreter$SimpleBoundaryEvent.execute$(ActorGraphInterpreter.scala:67)
       at org.apache.pekko.stream.impl.fusing.ActorGraphInterpreter$BatchingActorInputBoundary$OnComplete.execute(ActorGraphInterpreter.scala:103)
       at org.apache.pekko.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:637)
       at org.apache.pekko.stream.impl.fusing.ActorGraphInterpreter.org$apache$pekko$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:813)
       at org.apache.pekko.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:831)
       at org.apache.pekko.actor.Actor.aroundReceive(Actor.scala:547)
       at org.apache.pekko.actor.Actor.aroundReceive$(Actor.scala:545)
       at org.apache.pekko.stream.impl.fusing.ActorGraphInterpreter.aroundReceive(ActorGraphInterpreter.scala:729)
       at org.apache.pekko.actor.ActorCell.receiveMessage(ActorCell.scala:590)
       at org.apache.pekko.actor.ActorCell.invoke(ActorCell.scala:557)
       at org.apache.pekko.dispatch.Mailbox.processMailbox(Mailbox.scala:272)
       at org.apache.pekko.dispatch.Mailbox.run(Mailbox.scala:233)
       at org.apache.pekko.dispatch.Mailbox.exec(Mailbox.scala:245)
       at java.util.concurrent.ForkJoinTask.doExec
       at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec
       at java.util.concurrent.ForkJoinPool.scan
       at java.util.concurrent.ForkJoinPool.runWorker
       at java.util.concurrent.ForkJoinWorkerThread.run
   ```
   
   I did some reading at https://github.com/googleapis/nodejs-storage/issues/101#issuecomment-349356667 and https://pekko.apache.org/docs/pekko-http/current/configuration.html, my current theory is that we need to make sure that both the connection pool has its keep alive timeout set to infinity and any requests using the `Connection: Keep Alive` header explicitly
   
   @raboof @jrudolph Would be good if you manage to look into this, I am not 100% sure that this will actually solve the underlying issue, its just based off of what I could find on the internet.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Fix google cloud keep alive settings [pekko-connectors]

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #876:
URL: https://github.com/apache/pekko-connectors/pull/876#discussion_r1814822873


##########
google-fcm/src/test/scala/org/apache/pekko/stream/connectors/google/firebase/fcm/v1/impl/FcmSenderSpec.scala:
##########
@@ -83,7 +83,7 @@ class FcmSenderSpec
       val request: HttpRequest = captor.getValue
       Unmarshal(request.entity).to[FcmSend].futureValue shouldBe FcmSend(false, FcmNotification.empty)
       request.uri.toString should startWith("https://fcm.googleapis.com/v1/projects/projectId/messages:send")
-      request.headers.size shouldBe 1
+      request.headers.size shouldBe 2

Review Comment:
   Since we have added an extra keep alive header we know return 2 headers, but we still only check the first header for what we expect



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org