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

Feature request: Add (configurable?) number of retries on fail or timeout #17

Open
RobinR1 opened this issue May 21, 2024 · 6 comments
Open

Comments

@RobinR1
Copy link
Contributor

RobinR1 commented May 21, 2024

Once every hour we take an automated backup of the passbolt DB and keys. However this makes passbolt unresponsive or at least very slow during about 1 to 2 minutes.. But since we also run a lot of Ansible plays, with many lookups, it happens quite a lot that we get a timeout error from the lookup plugin at the times such a backup occurs.

So I would like to see the plugin to retry a few times before actually bailing out.

@AnatomicJC
Copy link
Collaborator

Hi,

How are you handle the backup of your database ?

If using MariaDB and mysqldump, you should consider mariabackup.

nysqldump freezes the database during backup as mariabackup shouldn't: https://mariadb.com/kb/en/full-backup-and-restore-with-mariabackup/

Cheers,

@AnatomicJC
Copy link
Collaborator

Another approach should be to configure a master-slave and perform the backup on the salve instance.

@RobinR1
Copy link
Contributor Author

RobinR1 commented May 22, 2024

If using MariaDB and mysqldump, you should consider mariabackup.

we are using mariadb but the backup is done using the
cake passbolt mysql_export
command. Not sure what method that uses to perform the export.

Another approach should be to configure a master-slave and perform the backup on the salve instance.

that has been added to my wish list now .. :-)

@AnatomicJC
Copy link
Collaborator

The cake passbolt mysql_export uses mysqldump, that's why you have a freeze of your environment.

You should consider mariabackup

This tool provides a production-quality, nearly non-blocking method for performing full backups on running systems.

Backup / restore operations: https://mariadb.com/kb/en/full-backup-and-restore-with-mariabackup/

@RobinR1
Copy link
Contributor Author

RobinR1 commented Jan 6, 2025

Meanwhile I have added a slave database and now backups are performed on the slave side, no longer causing locks/interruptions of the passbolt instance every hour.
However I still get passbolt timeouts every once in a while with the lookup plugin at random times. So an option to retry on timeout or to customize timeout is still feasible.

@Bigouden
Copy link

Bigouden commented Jan 9, 2025

I randomly encounter the same behavior when querying our self-hosted Passbolt. Some requests fail, result in a timeout, and cause the playbook to crash, even when a "retry" option is added to the Ansible tasks. It would be fantastic if the plugin could allow configuring the timeout and/or a retry mechanism.

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

3 participants