Skip to content

Waiting for promise resolution on post without timing out? #123

@SamD

Description

@SamD

I have deployed a lambda serving a graphql endpoint with aws-serverless-express. The application is working fine including serving the /graphiql and /playground apps and querying is returning content as expected from RDS.

The issue comes when posting content, I use Sequelize to perform the DB insertion inside my mutation that correctly returns a promise. For my testing I use cURL and in non-lambda mode the connection remains open until the transaction is committed, when posting against lambda the connection times out it seems as soon as the content is posted which is only a few seconds even though I have configured the lambda timeout for 5 minutes.
Additionally, even though the timeout has happened the full commit does complete and the content is persisted which is somewhat good news.

Is there some configuration for aws-serverless-express that is required to prevent this I might be missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions