Error migrating from single to flex postgres

João Dias 0 Reputation points
2025-02-13T17:03:57.81+00:00

After 16h in online migration the process failed with the following error:

DB004: Failed to fetch the current migrations status. Please reference MigrationId 3691c83d-e8ba-4fca-a612-88fd534ed620, when contacting Microsoft customer support. Parameter name: SourceDBServerResourceId

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. PratikLad 80 Reputation points Microsoft Vendor
    2025-02-18T08:35:09.1+00:00

    Hi @João Dias,

    DB004: Failed to fetch the current migrations status.

    The above error message shows the issue with permissions, connectivity problem.

    To resolve the permission issue, check the user you are using has proper permission in both source and target databases.

    In perspective of connectivity issues please check the network configuration and firewall if it is restricting your databases, so that they can communicate with each other without any network issue.

    Migration failed due to the Source server closing the connection unexpectedly.

    The main cause of this kind of error is connection timeout. A connection timeout occurs when either the server or the client expects to receive data within a certain duration, but no data is transferred or received, leading the connection to terminate. This issue can be caused by a variety of factors, such as network congestion, incorrect network configurations, or overly strict timeout settings.

    To resolve this issue connection timeout issues, adjust the below TCP parameters on both the source and target servers:

    • tcp_keepalives_idle=10
    • tcp_keepalives_interval=10
    • tcp_keepalives_count=60

    enter image description here

    Please go through these documentations that might help you:

    https://learn.microsoft.com/en-us/azure/postgresql/migrate/migration-service/troubleshoot-error-codes

    https://learn.microsoft.com/en-us/azure/postgresql/migrate/migration-service/concepts-known-issues-migration-service


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.