You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "aubertaa (via GitHub)" <gi...@apache.org> on 2023/03/29 12:27:24 UTC

[GitHub] [incubator-devlake] aubertaa opened a new issue, #4809: [Bug][backend (SQL)] Database seems to be constantly locked

aubertaa opened a new issue, #4809:
URL: https://github.com/apache/incubator-devlake/issues/4809

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### What happened
   
   After devlake start (docker compose up), it seems that database stays locked.
   
   For example, i'm trying to dump sql database to backup my instance (automated in a cloudformation AWS stack) and it's freezing on this when triggering this command:
   
   - command:
   
   `mysqldump -uroot -p$DB_ROOT_PASSWORD --databases lake  --skip-comments > /tmp/sqlbackup.sql`
   
   - `show processlist;` shows:
   
   `Waiting for table metadata lock | LOCK TABLES `_devlake_blueprint_labels` READ /*!32311 LOCAL */,`_devlake_blueprints` READ /*!32311 L`
   
   - here is the full processlist, if this could help:
   
   mysql> show processlist;
   ```
   +----+-----------------+------------------+------+---------+------+---------------------------------+------------------------------------------------------------------------------------------------------+
   | Id | User            | Host             | db   | Command | Time | State                           | Info                                                                                                 |
   +----+-----------------+------------------+------+---------+------+---------------------------------+------------------------------------------------------------------------------------------------------+
   |  5 | event_scheduler | localhost        | NULL | Daemon  |  323 | Waiting on empty queue          | NULL                                                                                                 |
   |  8 | devlake-user    | 172.17.0.4:37408 | lake | Sleep   |    1 |                                 | NULL                                                                                                 |
   |  9 | devlake-user    | 172.17.0.4:37424 | lake | Sleep   |  319 |                                 | NULL                                                                                                 |
   | 10 | devlake-user    | 172.17.0.4:37428 | lake | Sleep   |  319 |                                 | NULL                                                                                                 |
   | 11 | root            | localhost        | NULL | Query   |    0 | init                            | show processlist                                                                                     |
   | 12 | root            | localhost        | lake | Query   |   39 | Waiting for table metadata lock | LOCK TABLES `_devlake_blueprint_labels` READ /*!32311 LOCAL */,`_devlake_blueprints` READ /*!32311 L |
   +----+-----------------+------------------+------+---------+------+---------------------------------+------------------------------------------------------------------------------------------------------+
   6 rows in set (0.00 sec)
   ```
   
   I tried also with `--single-transaction=TRUE` option but it's not better, it's then waiting for FLUSH:
   
    mysql> show processlist;
   ```
   +----+-----------------+------------------+------+---------+------+-------------------------+------------------+
   | Id | User            | Host             | db   | Command | Time | State                   | Info             |
   +----+-----------------+------------------+------+---------+------+-------------------------+------------------+
   |  5 | event_scheduler | localhost        | NULL | Daemon  | 1957 | Waiting on empty queue  | NULL             |
   |  8 | devlake-user    | 172.17.0.4:37408 | lake | Sleep   |    0 |                         | NULL             |
   |  9 | devlake-user    | 172.17.0.4:37424 | lake | Sleep   | 1953 |                         | NULL             |
   | 10 | devlake-user    | 172.17.0.4:37428 | lake | Sleep   | 1953 |                         | NULL             |
   | 13 | root            | localhost        | NULL | Query   |  195 | Waiting for table flush | FLUSH TABLES     |
   | 15 | root            | localhost        | NULL | Query   |    0 | init                    | show processlist |
   +----+-----------------+------------------+------+---------+------+-------------------------+------------------+
   6 rows in set (0.00 sec)
   ```
   
   Killing process id 9 with `KILL 9;` is always enough to unlock the situation (process is respawn at each devlake restart).
   I don't know what this process is but it seems to lock a bit hardly the database.
   
   
   ### What do you expect to happen
   
   mysqldump command should be successful to make a backup of the database whenever i want.
   (same problem occurs of course when i'm trying to restore a dump with mysql command)
   
   ### How to reproduce
   
   start fresh devlake instance with docker-compose.
   try to dump the database with: 
   `mysqldump -uroot -p$DB_ROOT_PASSWORD --databases lake  --skip-comments > /tmp/sqlbackup.sql`
   
   ### Anything else
   
   version is 0.16-beta10 (but is not available in the list i can choose from)
   
   ### Version
   
   v0.15.0
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] github-actions[bot] commented on issue #4809: [Bug][backend (SQL)] Database seems to be constantly locked

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4809:
URL: https://github.com/apache/incubator-devlake/issues/4809#issuecomment-1581690153

   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] aubertaa commented on issue #4809: [Bug][backend (SQL)] Database seems to be constantly locked

Posted by "aubertaa (via GitHub)" <gi...@apache.org>.
aubertaa commented on issue #4809:
URL: https://github.com/apache/incubator-devlake/issues/4809#issuecomment-1491440719

   ok thanks for this information. What would you advise as a best way to shutdown then restarting only devlake container where i'm using docker composer to start the whole ? (and keep the advantage of compose yaml content with volumes, relations etc...)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] keon94 commented on issue #4809: [Bug][backend (SQL)] Database seems to be constantly locked

Posted by "keon94 (via GitHub)" <gi...@apache.org>.
keon94 commented on issue #4809:
URL: https://github.com/apache/incubator-devlake/issues/4809#issuecomment-1497897285

   @aubertaa Simply issuing `docker-compose stop devlake` on the devlake container should be sufficient. Then perform your backup, and then do `docker-compose start devlake`. Your volumes, etc should remain intact. 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] github-actions[bot] closed issue #4809: [Bug][backend (SQL)] Database seems to be constantly locked

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #4809: [Bug][backend (SQL)] Database seems to be constantly locked
URL: https://github.com/apache/incubator-devlake/issues/4809


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] klesh commented on issue #4809: [Bug][backend (SQL)] Database seems to be constantly locked

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on issue #4809:
URL: https://github.com/apache/incubator-devlake/issues/4809#issuecomment-1499863404

   @keon94 Maybe we should add a doc to explain the back up process


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] warren830 commented on issue #4809: [Bug][backend (SQL)] Database seems to be constantly locked

Posted by "warren830 (via GitHub)" <gi...@apache.org>.
warren830 commented on issue #4809:
URL: https://github.com/apache/incubator-devlake/issues/4809#issuecomment-1489572294

   Hi @aubertaa , we will investigate it and give you feedback asap


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] github-actions[bot] commented on issue #4809: [Bug][backend (SQL)] Database seems to be constantly locked

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4809:
URL: https://github.com/apache/incubator-devlake/issues/4809#issuecomment-1592154216

   This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] github-actions[bot] commented on issue #4809: [Bug][backend (SQL)] Database seems to be constantly locked

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4809:
URL: https://github.com/apache/incubator-devlake/issues/4809#issuecomment-1537579830

   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] klesh commented on issue #4809: [Bug][backend (SQL)] Database seems to be constantly locked

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on issue #4809:
URL: https://github.com/apache/incubator-devlake/issues/4809#issuecomment-1491433121

   @aubertaa , this is a feature instead of a bug to avoid multiple devlakes sharing the same database, check https://github.com/apache/incubator-devlake/pull/3881for detail. 😂 
   
   Please shut down the `devlake` before backing up the database.
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org