Cats-effect 3 - IO hangs after a while in concurrent fs2 streams

245 views Asked by At
  • I'm trying to run a fs2 application in a gcp e2-small, 0.5 vCPUs core machine. Therefore I'm seeing only io-compute-0 & io-compute-1 thread names in the logs.
  • In the application,
    • There are 2 fs2.Streams that run concurrently
    • Stream 1: read credentials from a Ref.of[F, SessionInfo]
    • call a REST api, do some processing on that data
    • save to disk as a zip file
    • also save some data in to a Ref.of[F,MyDTO]
    • This happens every 3 seconds.
    • Stream 2: read from Ref.of[F,MyDTO] and save some data into another file in the disk.
    • This stream runs every 281 seconds
  • I'm using AsyncHttpClientCatsBackend with a connection timeout of 1 minute but I don't see any timeouts even after few hours of hanging
  • I use Sync[F].blocking whenever I read/write files from disk.
  • After an hour or so the application hangs & below are some images from the thread dump that I took with jstack

I would appreciate any help to understand the issue.

runing methods

io-compute threads

Both are awaiting notification on [ 0x00000000e0ddac58 ] which is WorkStealingThreadPool

enter image description here

enter image description here

enter image description here

0

There are 0 answers