Hi team,
I am facing issues while connecting to the database, and I am using an Azure P2v2 App Service plan. In this plan, I have hosted two environments: one for production and another for UAT. When I start both applications, they return the error below. I also changed the App Service plan to P2v3, but it still doesn’t work. Could you please help us resolve this issue?
2024-08-19 07:30:18,274 ERROR [] Exception occur while inserting sessionId - 699f368c-b35c-490d-a0b6-c1d74a3e9726 in Schema: Dialogs_ChatTranscript for 'chat'
2024-08-19 07:30:18,280 ERROR [] Exception occur while inserting data in Schema for input data - {
"SchemaName": "Dialogs_ChatTranscript",
"Source": null,
"Data": "{\"attachment\":null,\"sessionId\":\"699f368c-b35c-490d-a0b6-c1d74a3e9726\",\"conversationId\":\"1d0c4930dbfe581a8b6068654c0d9f141724051977483\",\"channel\":\"AgentHandOffApi\",\"from\":\"Bot\",\"fromName\":\"teva-production\",\"fromId\":\"28:e43060b0-6f0a-4b4b-9763-a459496ee65d\",\"fromEmailId\":\"\",\"to\":\"User\",\"toName\":\"Chandrahas Sampelli\",\"toId\":\"Chandrahas.Sampelli@teva.de\",\"toEmailId\":\"Chandrahas.Sampelli@teva.de\",\"messageId\":\"9a36da44-bc71-453f-9a8f-fb999bc755e3\",\"messageText\":\"You are now connected with Lekhapriya CPPlease be informed that the live chat service does not support sending files or images. \",\"messageType\":\"text\",\"originalMessageText\":\"You are now connected with Lekhapriya CPPlease be informed that the live chat service does not support sending files or images. \",\"originalMessageLanguage\":\"en\",\"nlp\":{\"nlpName\":null,\"nlpEngine\":null,\"intent\":null,\"score\":null,\"entities\":null,\"category\":null,\"detectedBy\":null},\"qnaMaker\":{\"result\":null,\"score\":null},\"errorMessage\":null,\"isPIIDataEncrypted\":false,\"createdOn\":\"2024-08-19T07:30:17.070\"}",
"SessionType": "chat"
}, error - MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server.
---> System.Net.Sockets.SocketException (10048): Only one usage of each socket address (protocol/network address/port) is normally permitted. 172.25.1.5:27025
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at MongoDB.Driver.Core.Connections.TcpStreamFactory.Connect(Socket socket, EndPoint endPoint, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Connections.TcpStreamFactory.CreateStream(EndPoint endPoint, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Connections.BinaryConnection.OpenHelper(CancellationToken cancellationToken)
--- End of inner exce2024-08-19 07:30:31,267 ERROR [699f368c-b35c-490d-a0b6-c1d74a3e9726] MongoDB.Driver.MongoConnectionPoolPausedException: The connection pool is in paused state for server 172.25.1.5:27025.
at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.PoolState.ThrowIfNotReady()
at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.ConnectionCreator.CreateOpenedOrReuse(CancellationToken cancellationToken)
at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.AcquireConnectionHelper.AcquireConnection(CancellationToken cancellationToken)
at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.AcquireConnection(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Servers.Server.GetChannel(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.RetryableReadContext.Initialize(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.RetryableReadContext.Create(IReadBinding binding, Boolean retryRequested, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.AggregateOperation`1.Execute(IReadBinding binding, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.ExecuteReadOperation[TResult](IClientSessionHandle session, IReadOperation`1 operation, ReadPreference readPreference, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.ExecuteReadOperation[TResult](IClientSessionHandle session, IReadOperation`1 operation, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.Aggregate[TResult](IClientSessionHandle session, PipelineDefinition`2 pipeline, AggregateOptions options, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.<>c__DisplayClass20_0`1.<Aggregate>b__0(IClientSessionHandle session)
at MongoDB.Driver.MongoCollectionImpl`1.UsingImplicitSession[TResult](Func`2 func, CancellationToken cancellationToken)
at MongoDB.Driver.Linq.Linq3Implementation.Translators.ExpressionToExecutableQueryTranslators.ExecutableQuery`3.Execute(IClientSessionHandle session, CancellationToken cancellationToken)
at MongoDB.Driver.Linq.Linq3Implementation.MongoQueryProvider`1.Execute[TResult](Expression expression)
at Sensiple.Tryvium.Data.MongoDB.CommonConnector.GetBotId(String sessionId, String sessionType)