Skip to content

better error messaging when failure to create api session DB #593

@nicks

Description

@nicks

What you'd like to see

Repro steps:

Create a Dockerfile like this:

FROM docker/cagent

USER root
WORKDIR /app
COPY agent.yaml ./agent.yaml

USER cagent
ENTRYPOINT ["/cagent", "api", "./agent.yaml", "--listen", ":3001"]

Build and run the Dockerfile.

You'll get the following error:

architect-api-1  | failed to create session store: unable to open database file: out of memory (14)

Why you'd like to see it

I'd like to see a better error message about what, exactly, cagent was trying to do that failed. Like what database file was it creating?

It took me a while to figure out why this was failing, since I spent a bunch of time trying to free up memory 😂

The real problem was that the filesystem was readonly, and cagent was trying to create a sqllite database in a readonly location.

Workarounds?

The fix was to add --session-db to a location where cagent has write access.

Additional context

Any other info you consider useful can be included here

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions