Skip to content

Blocking database operation in async method #1

@skewty

Description

@skewty

https://github.com/ahmednafies/fastapi_sqlalchemy_alembic/blob/c97cca7438faaf20bddf7451f34561b193fdf57f/main.py#L20

If the database is down or the database call is slow for any reason your website will be down. This is a self inflicted DoS. The async keyword should not be used here.

SQLalchemy doesn't support asycio yet. See Databases or GINO for async wrappers around SQL Alchemy.

Otherwise, thanks for the boilerplate.

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