Closed RealFrancisHe closed 1 year ago
From what Shlink version are you updating?
From what Shlink version are you updating?
I'm asking this because the timeout is probably due to some long migrations execution because of a big database (happens with some migrations).
However, v3.6.x has a bug where the proper timeout is not being set when running the migrations, but these versions do not include new migrations themeselves.
A possible workaround would be to update to an earlier version first, and only after migrations have finished successfully, then update to 3.6.3 (you can see more around updates here https://shlink.io/documentation/update-your-instance/)
And to elaborate on the problem, this is how Shlink <3.6 used to run the entry point commands:
flowchart LR
A[Entry point] --> B(shlink db:create) --> H(...)
A --> C(shlink db:migrate)
C -->|10m timeout| D(doctrine migrations:migrate)
A --> E(...)
And this is how Shlink >=3.6 does it now
flowchart LR
A[Entry point] --> B(shlink-installer init)
B --> C(shlink db:create) --> H(...)
B -->|1m timeout| D(shlink db:migrate)
D -->|10m timeout| E(doctrine migrations:migrate)
B --> F(...)
As you can see, there's a new shlink-installer init
command wrapping all the entry point operations, which is also used for non-docker setups.
The bug is that it is not defining it's own 10m timeout, resulting in the error you see if migrations take more than 1 minute.
How Shlink is set up
Summary
When trying to run a new container on a previously used Postgresql database, the db:migrate times out at 60 seconds. This specifically only applies to the running it using an image, as I was able to originally get Shlink running via the installer, which lags when running the update, but does not timeout.
Command:
Logs:
Thanks! Any help is appreciated.