You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/07/19 19:17:00 UTC

[GitHub] [incubator-superset] rahul-srivastava-sp opened a new issue #7902: superset db upgrade hangs for a custom alembic script

rahul-srivastava-sp opened a new issue #7902: superset db upgrade hangs for a custom alembic script
URL: https://github.com/apache/incubator-superset/issues/7902
 
 
   The superset db upgrade command hangs when trying we wrote a custom alembic script to increase the length of username column in the ab_user table. Once the upgrade runs, it creates an idle sleep connection with the database which `supposedly` creates a lock on the ab_user table which prevents the alter command to run. We are using a 10.1.19-MariaDB as the database which is hosted in AWS RDS. 
   
   For the first time installation, the upgrade works fine and deployment completes successfully. But when we create a new alembic script, build and restart the server the hoping the db upgrade should result
   
   Not able to figure out how a sleep command is getting generated internally before the upgrade process. Has it to do with FAB or alembic in general?
   
   ### Expected results
   The db upgrade process should complete successfully
   
   ### Actual results
   The upgrade process hangs during 
   
   #### Screenshots
   The list of all the process for the db. The second last row is the one which prevents the ALTER command to be executed. The time for the command is same so it seems it just go triggered during the upgrade process
   ![AllProcessList](https://user-images.githubusercontent.com/43594455/61559248-d9c08080-aa2e-11e9-88d5-013debca9660.jpg)
   
   The lock on ab_user table
   ![ab_user_LOCK](https://user-images.githubusercontent.com/43594455/61559360-1ee4b280-aa2f-11e9-8a03-19408b7d721a.png)
   
   
   
   #### How to reproduce the bug
   
   1. Have an installed version of superset running with db up and running.
   2. Write a custom alembic migrate script to increase the username length
   3. Build the project and restart the server.
   4. The `db upgrade` process should get stuck
   
   ### Environment
   
   - superset version: `0.999.0dev`
   - python version: `3.7.2`
   - node.js version: `10.15.0`
   - npm version: `6.9.0`
   
   ### Additional context
   
   The upgrade process gets stuck for ~ 8 hours as the sleep command times out after that time as per the default db configuration time for time_wait_timeout and wait_timeout of 28800 seconds. After the time out, the ALTER command gets executed. Also, if we manually KILL the thread, the ALTER gets executed and the upgrade finishes successfully.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org