Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with mediator when many users are trying to connect with mediator using PickUpV2 as a mediator pickup strategy. #2078

Closed
sairanjit opened this issue Nov 1, 2024 · 1 comment

Comments

@sairanjit
Copy link
Contributor

We are facing issue with mediator even when 200+ users are trying to connect with mediator using pickupv2 as a mediator pickup strategy. We are observing Database CPU usage crosses 99% with instance type : RDS m6i.xlarge & RDS m6i.2xlarge both are tried

We also tried using the AWS RDS Proxy as suggested here https://github.com/hyperledger/aries-askar/blob/main/docs/storage.md#aws-rds-proxy but are still facing the same problem.

We are using the following
mediator https://github.com/credebl/mediator-agent

We are getting high CPU utilisation due to the below query

SELECT id, kind, category, name, value, (SELECT ARRAY_TO_STRING(ARRAY_AGG(it.plaintext  ?  ENCODE(it.name, ?)  ?  ENCODE(it.value, ?)), ?) FROM items_tags it WHERE it.item_id = i.id) tags FROM items i WHERE profile_id = $1 AND (kind = $2 OR $2 IS NULL) AND (category = $3 OR $3 IS NULL) AND (expiry IS NULL OR expiry > CURRENT_TIMESTAMP) AND ((i.id IN (SELECT item_id FROM items_tags WHERE name = $4 AND value = $5 AND SUBSTR(value, ?, ?) = $6 AND plaintex

Please suggest if any changes required or any recommendations for configurations

@sairanjit sairanjit changed the title Issue with mediator even when many users are trying to connect with mediator using PickUpV2 as a mediator pickup strategy. Issue with mediator when many users are trying to connect with mediator using PickUpV2 as a mediator pickup strategy. Nov 1, 2024
@genaris
Copy link
Contributor

genaris commented Feb 4, 2025

If I remember correctly, this has to do with the way the Message Pickup queue is handled in https://github.com/openwallet-foundation/didcomm-mediator-credo. This can be most likely solved if we switch to another queue storage mechanism (like the one we use in our repo, that we are willing to contribute to OWF).

I'm closing this issue but we can continue discussion in openwallet-foundation/didcomm-mediator-credo#42

@genaris genaris closed this as completed Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants