Flask, Alembic, PGSQL: Migration hangs after upgrade to 1.13.2 and works ONCE after downgrade to 1.13.0 #1500
Unanswered
BID-Equity
asked this question in
Usage Questions
Replies: 1 comment 1 reply
-
it's very unlikely this has anything to do with specific features in alembic. what you want to do when PostgreSQL hangs is identify what it's hung on , which you do by looking at pg_stat_activity during the hang. that will provide detail on long running queries as well as deadlocks. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
We have a comprehensive Flask app with SQLAlchemy and use alembic for schema management.
A couple of days ago (we believe with the arrival of 1.13.2), we are not able to execute any alembic command that touches the database (upgrade, migrate, current) but can execute commands that only touch the migration files (e.g. heads).
When executing a DB command, the flask app starts but nothing happens. PGSQL is new and empty.
If we rebuild the project with alembic==1.13.0, the command execute nicely ONCE. A second time, it just hangs. alembic==1.13.2, rebuild, alembic==1.13.2, rebuild buys us another single run
Expected behavior
We expect 'flask db upgrade' not to silently hang
To Reproduce
For us its as described above:
empty setup
docker-compose start
docker exec -ti /bin/bash
flask db upgrade
works
then flask -db upgrade (or migrate -m '')
hangs
Error
No output at all. Even with increased log level
Beta Was this translation helpful? Give feedback.
All reactions