问题
We use the cf ssh
command to open a tunnel so we can access the MariaDB from our jenkins job.
cf ssh -N -L 13000:10.0.20.18:3306 hostapp &
As soon as the tunnel is open, we have [liquibase][http://www.liquibase.org] connect to the DB to update the schema.
This works fine so far, but some of the DDL scripts and dataloads do take a long time and unfortunate it seems that the cf ssh
tunnel is only open for about 24 minutes and then the connection is dropped.
Is there any way to extend this time? In other environments then swisscom, we used to have DDL manipulations on large tables which did take up to 2 hours, but it was not an issue as we did not have to go through a tunnel, but had a direct connection to the DB and the DB had the timeout set to multiple hours.
While writing this... maybe its not even ssh
that drops the connection, but the DB drops it? What is the connection timeout on the swisscom MariaDB?
来源:https://stackoverflow.com/questions/47061859/why-does-cloudfoundry-ssh-drop-the-connection-after-24-minutes