Azure Cosmos db performance issues and how to improve

1

I am trying to improve my azure cosmos db performance.I have try DocumentDB performance issues. this ideas include direct/tcp. but direct/tcp not supported. I got the following error.How to solve this error:

"title": "Internal Server Error",
        "detail": "Service is currently unavailable.\r\nActivityId: dd45cae0-e0b9-4c5c-9039-1f6839e81471, \r\nRequestStartTime: 2019-09-19T06:33:34.7404290Z, RequestEndTime: 2019-09-19T06:34:07.2860329Z, Number of regions attempted: 1\r\nResponseTime: 2019-09-19T06:33:38.1706592Z, StoreResult: StorePhysicalAddress: rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/apps/2e4073a1-d7d5-47c8-b94f-e4e60c9c553d/services/f797055b-5ba3-4d3f-bb26-ba3dba648300/partitions/15ad591d-fe0f-4bd4-bd27-31b31609a546/replicas/132132851101862678p/, LSN: -1, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 410, SubStatusCode: 0, RequestCharge: 0, ItemLSN: -1, SessionToken: , UsingLocalLSN: False, TransportException: A client transport error occurred: DNS resolution failed. (Time: 2019-09-19T06:33:38.1675318Z, activity ID: dd45cae0-e0b9-4c5c-9039-1f6839e81471, error code: DnsResolutionFailed [0x0003], base error: socket error HostNotFound [0x00002AF9], URI: rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/, connection: <not connected> -> rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/, payload sent: False, CPU history: not available, CPU count: 8), ResourceType: Document, OperationType: Create\r\nResponseTime: 2019-09-19T06:33:38.3536688Z, StoreResult: StorePhysicalAddress: rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/apps/2e4073a1-d7d5-47c8-b94f-e4e60c9c553d/services/f797055b-5ba3-4d3f-bb26-ba3dba648300/partitions/15ad591d-fe0f-4bd4-bd27-31b31609a546/replicas/132132851101862678p/, LSN: -1, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 410, SubStatusCode: 0, RequestCharge: 0, ItemLSN: -1, SessionToken: , UsingLocalLSN: False, TransportException: A client transport error occurred: DNS resolution failed. (Time: 2019-09-19T06:33:38.3513609Z, activity ID: dd45cae0-e0b9-4c5c-9039-1f6839e81471, error code: DnsResolutionFailed [0x0003], base error: socket error HostNotFound [0x00002AF9], URI: rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/, connection: <not connected> -> rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/, payload sent: False, CPU history: not available, CPU count: 8), ResourceType: Document, OperationType: Create\r\nResponseTime: 2019-09-19T06:33:39.5317716Z, StoreResult: StorePhysicalAddress: rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/apps/2e4073a1-d7d5-47c8-b94f-e4e60c9c553d/services/f797055b-5ba3-4d3f-bb26-ba3dba648300/partitions/15ad591d-fe0f-4bd4-bd27-31b31609a546/replicas/132132851101862678p/, LSN: -1, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 410, SubStatusCode: 0, RequestCharge: 0, ItemLSN: -1, SessionToken: , UsingLocalLSN: False, TransportException: A client transport error occurred: DNS resolution failed. (Time: 2019-09-19T06:33:39.5291665Z, activity ID: dd45cae0-e0b9-4c5c-9039-1f6839e81471, error code: DnsResolutionFailed [0x0003], base error: socket error HostNotFound [0x00002AF9], URI: rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/, connection: <not connected> -> rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/, payload sent: False, CPU history: not available, CPU count: 8), ResourceType: Document, OperationType: Create\r\nResponseTime: 2019-09-19T06:33:41.7201961Z, StoreResult: StorePhysicalAddress: rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/apps/2e4073a1-d7d5-47c8-b94f-e4e60c9c553d/services/f797055b-5ba3-4d3f-bb26-ba3dba648300/partitions/15ad591d-fe0f-4bd4-bd27-31b31609a546/replicas/132132851101862678p/, LSN: -1, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 410, SubStatusCode: 0, RequestCharge: 0, ItemLSN: -1, SessionToken: , UsingLocalLSN: False, TransportException: A client transport error occurred: DNS resolution failed. (Time: 2019-09-19T06:33:41.7175906Z, activity ID: dd45cae0-e0b9-4c5c-9039-1f6839e81471, error code: DnsResolutionFailed [0x0003], base error: socket error HostNotFound [0x00002AF9], URI: rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/, connection: <not connected> -> rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/, payload sent: False, CPU history: not available, CPU count: 8), ResourceType: Document, OperationType: Create\r\nResponseTime: 2019-09-19T06:33:45.9118012Z, StoreResult: StorePhysicalAddress: rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/apps/2e4073a1-d7d5-47c8-b94f-e4e60c9c553d/services/f797055b-5ba3-4d3f-bb26-ba3dba648300/partitions/15ad591d-fe0f-4bd4-bd27-31b31609a546/replicas/132132851101862678p/, LSN: -1, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 410, SubStatusCode: 0, RequestCharge: 0, ItemLSN: -1, SessionToken: , UsingLocalLSN: False, TransportException: A client transport error occurred: DNS resolution failed. (Time: 2019-09-19T06:33:45.9095557Z, activity ID: dd45cae0-e0b9-4c5c-9039-1f6839e81471, error code: DnsResolutionFailed [0x0003], base error: socket error HostNotFound [0x00002AF9], URI: rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/, connection: <not connected> -> rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/, payload sent: False, CPU history: not available, CPU count: 8), ResourceType: Document, OperationType: Create\r\nResponseTime: 2019-09-19T06:33:54.0995182Z, StoreResult: StorePhysicalAddress: rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/apps/2e4073a1-d7d5-47c8-b94f-e4e60c9c553d/services/f797055b-5ba3-4d3f-bb26-ba3dba648300/partitions/15ad591d-fe0f-4bd4-bd27-31b31609a546/replicas/132132851101862678p/, LSN: -1, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 410, SubStatusCode: 0, RequestCharge: 0, ItemLSN: -1, SessionToken: , UsingLocalLSN: False, TransportException: A client transport error occurred: DNS resolution failed. (Time: 2019-09-19T06:33:54.0966284Z, activity ID: dd45cae0-e0b9-4c5c-9039-1f6839e81471, error code: DnsResolutionFailed [0x0003], base error: socket error HostNotFound [0x00002AF9], URI: rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/, connection: <not connected> -> rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/, payload sent: False, CPU history: not available, CPU count: 8), ResourceType: Document, OperationType: Create\r\nResponseTime: 2019-09-19T06:34:07.2860329Z, StoreResult: StorePhysicalAddress: rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/apps/2e4073a1-d7d5-47c8-b94f-e4e60c9c553d/services/f797055b-5ba3-4d3f-bb26-ba3dba648300/partitions/15ad591d-fe0f-4bd4-bd27-31b31609a546/replicas/132132851101862678p/, LSN: -1, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 410, SubStatusCode: 0, RequestCharge: 0, ItemLSN: -1, SessionToken: , UsingLocalLSN: False, TransportException: A client transport error occurred: DNS resolution failed. (Time: 2019-09-19T06:34:07.2838197Z, activity ID: dd45cae0-e0b9-4c5c-9039-1f6839e81471, error code: DnsResolutionFailed [0x0003], base error: socket error HostNotFound [0x00002AF9], URI: rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/, connection: <not connected> -> rntbd://cdb-ms-prod-australiacentral1-fd1.documents.azure.com:14168/, payload sent: False, CPU history: not available, CPU count: 8), ResourceType: Document, OperationType: Create\r\nAddressResolution - StartTime: 2019-09-19T06:33:37.9845937Z, EndTime: 2019-09-19T06:33:38.1533189Z, TargetEndpoint: https://ucdp-australiacentral.documents.azure.com//addresses/?$resolveFor=dbs%2fppJkAA%3d%3d%2fcolls%2fppJkAND2v70%3d%2fdocs&$filter=protocol eq rntbd&$partitionKeyRangeIds=0\r\nAddressResolution - StartTime: 2019-09-19T06:33:38.1794666Z, EndTime: 2019-09-19T06:33:38.3474187Z, TargetEndpoint: https://ucdp-australiacentral.documents.azure.com//addresses/?$resolveFor=dbs%2fppJkAA%3d%3d%2fcolls%2fppJkAND2v70%3d%2fdocs&$filter=protocol eq rntbd&$partitionKeyRangeIds=0\r\nAddressResolution - StartTime: 2019-09-19T06:33:39.3575906Z, EndTime: 2019-09-19T06:33:39.5267481Z, TargetEndpoint: https://ucdp-australiacentral.documents.azure.com//addresses/?$resolveFor=dbs%2fppJkAA%3d%3d%2fcolls%2fppJkAND2v70%3d%2fdocs&$filter=protocol eq rntbd&$partitionKeyRangeIds=0\r\nAddressResolution - StartTime: 2019-09-19T06:33:41.5442079Z, EndTime: 2019-09-19T06:33:41.7144700Z, TargetEndpoint: https://ucdp-australiacentral.documents.azure.com//addresses/?$resolveFor=dbs%2fppJkAA%3d%3d%2fcolls%2fppJkAND2v70%3d%2fdocs&$filter=protocol eq rntbd&$partitionKeyRangeIds=0\r\nAddressResolution - StartTime: 2019-09-19T06:33:45.7340835Z, EndTime: 2019-09-19T06:33:45.9069121Z, TargetEndpoint: https://ucdp-australiacentral.documents.azure.com//addresses/?$resolveFor=dbs%2fppJkAA%3d%3d%2fcolls%2fppJkAND2v70%3d%2fdocs&$filter=protocol eq rntbd&$partitionKeyRangeIds=0\r\nAddressResolution - StartTime: 2019-09-19T06:33:53.9239844Z, EndTime: 2019-09-19T06:33:54.0938462Z, TargetEndpoint: https://ucdp-australiacentral.documents.azure.com//addresses/?$resolveFor=dbs%2fppJkAA%3d%3d%2fcolls%2fppJkAND2v70%3d%2fdocs&$filter=protocol eq rntbd&$partitionKeyRangeIds=0\r\nAddressResolution - StartTime: 2019-09-19T06:34:07.1114805Z, EndTime: 2019-09-19T06:34:07.2808921Z, TargetEndpoint: https://ucdp-australiacentral.documents.azure.com//addresses/?$resolveFor=dbs%2fppJkAA%3d%3d%2fcolls%2fppJkAND2v70%3d%2fdocs&$filter=protocol eq rntbd&$partitionKeyRangeIds=0\r\n, Windows/10.0.17134 documentdb-netcore-sdk/2.4.0"
azure-cosmosdb

2 Answers

1

Service is currently unavailable

Based on the document,the error indicates that : When using TCP in Direct Mode, in addition to the Gateway ports, you need to ensure the port range between 10000 and 20000 is open because Azure Cosmos DB uses dynamic TCP ports. If these ports are not open and you attempt to use TCP, you receive a 503 Service Unavailable error.

The following table shows connectivity modes available for different APIs and the service ports user for each API:

enter image description here

BTW,mostly of time, you could reduce the priority of connection mode optimization methods because it is limited by some network or firewall settings.You could follow other approaches in this link. Such as SDK usage and indexing policy.

answered on Stack Overflow Sep 19, 2019 by Jay Gong
0

The stack trace points to a client side transport error:

A client transport error occurred: DNS resolution failed and socket error HostNotFound [0x00002AF9].

There seems to be something blocking your client of correctly resolving DNS records. If you are behind a Proxy or Firewall, you need to make sure the entire range of ports is correctly being forwarded.

answered on Stack Overflow Sep 19, 2019 by Matias Quaranta

User contributions licensed under CC BY-SA 3.0