Error with migrating RDS for PostgreSQL database to Azure Database for PostgreSQL flexible server.
On the AWS side I have a fairly large database, more than 1 TB.. The connection between Azure and AWS is via site-to-site vpn, so Runtime Server is used to integrate DMS and Vnet.
After more than 10 hours of migration, the process stalled with the error:
One or more errors occurred while migrating 'db_name' : Migration failed due to the Target server closing the connection unexpectedly. Please check the server's configuration or check if your application closes long running connections and retry. If the error persists, contact Microsoft support. Migration failed due to the Target server closing the connection unexpectedly. Please check the server's configuration or check if your application closes long running connections and retry. If the error persists, contact Microsoft support. Migration failed due to the Source server closing the connection unexpectedly. Please check the server's configuration or check if your application closes long running connections and retry. If the error persists, contact Microsoft support. Migration failed due to the Source server closing the connection unexpectedly. Please check the server's configuration or check if your application closes long running connections and retry. If the error persists, contact Microsoft support. Migration failed due to the Source server closing the connection unexpectedly. Please check the server's configuration or check if your application closes long running connections an...
Earlier on Microsoft Q&A I already found a similar problem where it was recommended to change the server parameters
tcp_keepalives_idle=10
tcp_keepalives_interval=10
tcp_keepalives_count=60
Both for the source server and for the target. In my case, I also changed the value for the runtime server.
But it didn't help.