Skip to content

Endpoint call fails, if flask-profiler has error #116

@amarvin

Description

@amarvin

flask-profiler is awesome, nice work! I'm using it with SQLAlchemy and PostgreSQL. Sometimes there are spikes of usage with my app though, and I get this error:

sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) SSL SYSCALL error: EOF detected

which I believe is an error writing the runtime to PostgreSQL occurring when there's many simultaneous database connections. Perhaps flask-profiler could fix this error, by adding a pool_pre_ping=True to the database engine.

Regardless if that error is fixed, I would expect that such an error doesn't also make the endpoint call fail. Couldn't flask-profiler run the "write to database" step in a subprocess that's allowed to fail so that the endpoint can still succeed?

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