Skip to content

Spring lambda having async mechanism with preserver-concurrency enabled still taking ~2.5 seconds for first request #322

Closed
@siddiquebagwan-gslab

Description

@siddiquebagwan-gslab
  • Framework version: 1.4 (aws-serverless-java-container-spring)
  • Implementations: Spring

Scenario

Stub Spring lambda having preserve concurrency and async initialisation in constructor as per code example given in README https://github.com/awslabs/aws-serverless-java-container/wiki/Quick-start---Spring in section Asynchronous initialisation

Expected behaviour

First invocation should take milli seconds time. As we just have stub api which is returning hard-coded simple POJO having 4 simple string attributes and preserve-concurrency is enabled

Actual behaviour

First invocation is taking ~2.5 seconds and subsequent is getting served in milliseconds ~600 milliseconds

Steps to reproduce

Verify above behaviour with sample app

Full log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions