#Database Max Retries
1 messages · Page 1 of 1 (latest)
v0.5.8
Can you try again using v0.6.2? Also, the issue of providing JSON output for the logger is available in this release. You can use it by writing log-output=json to the environment variable or the config file if you wish. The documentation can be found at 'https://docs.permify.co/docs/reference/configuration/'
Is 0.6.3 also good ?
Yes, I wrote it wrong, it's v0.6.3
This helped in the performance but I still get a lot of this kind of errors
Failed to write data to the database. Max retries reached. Aborting operation.
Also this
Error encountered
Can you tell me approximately how many writing processes you have done? And do you send each relationship in separate requests?
No, we send multiple relationships in each request and multiple requests together. Here is my current configuration.
Amount of parallel gRPC requests: 20
Amount of tuples inside each request: 20
Amount of operations: 25000
The whole process is taking approximatively 15 minutes.
~ 30 requests/second
In PostgreSQL database, we perform write operations at the Serializable isolation level to avoid any inconsistencies. The error you are encountering occurs in two main scenarios: Firstly, it happens when a transaction makes decisions based on the outcomes of another transaction, and these outcomes change, leading to a conflict. Secondly, it arises when two transactions try to modify the same data simultaneously. As a result, the system attempts to retry the transaction. The retry limit is set to 10. The error message you are receiving indicates that this retry limit has been exceeded.
I will consult with my team and get back to you as soon as possible with a better solution. If this is a one-time operation and you do not expect such a high volume of write requests in production, you could consider performing write operations at specific intervals. I will follow up with you shortly.
Okay thank you
Hello @wanton sluice , Thanks for your patience. I've discussed with my team and we are ready to make an optimization. Can you open this as an issue? We will include this optimization in this quarter's developments.
Hi 👋
You mean opening a GitHub issue ?
yes
Hello @wanton sluice , we implemented a backoff strategy in version 0.7.1 to address the issue with the writes. Could you please test it again and inform us about the results?
Hi @latent socket , we have released v0.6 already and I will upgrade it next week
Let you know with that
Thank you for the follow up