We have deployed a .NET Aries mediator agent that uses the PostgreSQL storage.
The mediator works as expected under a normal load.
I've build a tool to simulate a big load for the mediator. It simulates multiple mobile agents concurrently creating wallets and checking for new messages from the mediator.
When the number of agents reaches 70-80, the mediator starts to log the following error:
Hyperledger.Indy.WalletApi.WalletItemNotFoundException: No value with the specified key exists in the wallet from which it was requested.\n at Hyperledger.Aries.Utils.CryptoUtils.UnpackAsync(Wallet wallet, Byte[] message)\n at Hyperledger.Aries.Agents.AgentBase.UnpackAsync(IAgentContext agentContext, PackedMessageContext message)\n --- End of inner exception stack trace ---\n at Hyperledger.Aries.Agents.AgentBase.UnpackAsync(IAgentContext agentContext, PackedMessageContext message)\n at Hyperledger.Aries.Agents.AgentBase.ProcessMessage(IAgentContext agentContext, MessageContext messageContext)\n at Hyperledger.Aries.Agents.AgentBase.ProcessAsync(IAgentContext context, MessageContext messageContext)\n at Hyperledger.Aries.AspNetCore.AgentMiddleware.Invoke(HttpContext aHttpContext, IAgentProvider aAgentProvider)\n at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application)"}`
We have ensured there are enough resources for the mediator and for the DB on the server.
When testing the same scenario with SQLite, the number of agents increases to 200+, until the resources from my local machine are exhausted.
Does anybody have an idea why the Postgres fails under load as opposed to SQLite?
We have deployed a .NET Aries mediator agent that uses the PostgreSQL storage. The mediator works as expected under a normal load. I've build a tool to simulate a big load for the mediator. It simulates multiple mobile agents concurrently creating wallets and checking for new messages from the mediator. When the number of agents reaches 70-80, the mediator starts to log the following error:
Hyperledger.Indy.WalletApi.WalletItemNotFoundException: No value with the specified key exists in the wallet from which it was requested.\n at Hyperledger.Aries.Utils.CryptoUtils.UnpackAsync(Wallet wallet, Byte[] message)\n at Hyperledger.Aries.Agents.AgentBase.UnpackAsync(IAgentContext agentContext, PackedMessageContext message)\n --- End of inner exception stack trace ---\n at Hyperledger.Aries.Agents.AgentBase.UnpackAsync(IAgentContext agentContext, PackedMessageContext message)\n at Hyperledger.Aries.Agents.AgentBase.ProcessMessage(IAgentContext agentContext, MessageContext messageContext)\n at Hyperledger.Aries.Agents.AgentBase.ProcessAsync(IAgentContext context, MessageContext messageContext)\n at Hyperledger.Aries.AspNetCore.AgentMiddleware.Invoke(HttpContext aHttpContext, IAgentProvider aAgentProvider)\n at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication
1 application)"}` We have ensured there are enough resources for the mediator and for the DB on the server. When testing the same scenario with SQLite, the number of agents increases to 200+, until the resources from my local machine are exhausted. Does anybody have an idea why the Postgres fails under load as opposed to SQLite?