Skip to content

AkkaHttpClient send method hangs #3493

@EliseevAndrew

Description

@EliseevAndrew

I encountered a ElasticClient.execute method hang when I am trying to execute a lot of simultanios requests to elastic. I am using elastic4s-client-akka.

AkkaHttpClient uses akka stream source queue with backpressure overflow strategy. When we try to offer one element into queue and if inner buffers of the QueueSource are full the SourceQueue.offer return Future.failed. Then we cautch the exception with recoverWith method and try to invoke markDead method. But RequestState.host Promise cannot be completed at all because it will be completed in the queue stream later.

Is it a bug or expected behavior? Maybe it is better to crash ElasticClient.execute method when a queue is overflowed.

P.S. Sorry for my english and have a good day!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions