Connection time out in flyway

后端 未结 2 1735
遇见更好的自我
遇见更好的自我 2021-01-22 20:04

I\'m using flyway 1.5 and mysql Ver 14.14 Distrib 5.1.52, for unknown-linux-gnu (x86_64) using readline 5.1

I wrote the following migration:



        
2条回答
  •  后悔当初
    2021-01-22 20:48

    A bit of analysis:

    As the Flyway Command-line Tool creates two new connections when it starts, connection staleness can be ruled out.

    Flyway will then first open a connection for the metadata table and lock it.

    It will then open a second connection and execute the migration. I am assuming this step takes very long (+- 11mins from the logs).

    When the migration completes, the transaction on the second connection commits and the new row is added in the metadata table through the first connection.

    This is where it bombs... But with a communication and not with a connection timeout or a lock timeout exception.

    Could it be that some piece of network equipment (router/switch/proxy) between the app and the DB is dropping inactive connections?

提交回复
热议问题