Skip to content

Race condition causes container.fetch to throw "start() cannot be called on a container that is already running." #173

@AggressivelyMeows

Description

@AggressivelyMeows

If two requests hit Workers within a few hundred milliseconds, they will both request the container to start. However this throws an error which isnt handled by the lib.

In my opinion, if we're trying to fetch a container and the container is already started, this shouldnt throw an error. I understand .start() itself should throw since that can inject env into the container itself, but when we've set no env and we're just trying to fetch the container it should silently swallow the error. Otherwise, I need to add complex retry logic to check if the error is from the container or from the logic controlling it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions