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

CronArchive.archiveSingleSite.start gets concurrently called for same site #15267

Closed
pardvm opened this issue Dec 13, 2019 · 1 comment
Closed
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@pardvm
Copy link

pardvm commented Dec 13, 2019

In order to improve archiving performance, we have 10 cron archive tasks in our on premise Matomo installation.

It has been that way for long time with no problem at all: the cron tasks distributed the sites and all of them were archived only once.

However, we had to hook the CronArchive.archiveSingleSite.start event and, since that moment, we observe that the code in CronArchive.archiveSingleSite.start is being executed concurrently by several crons tasks.

Is there any way to avoid that concurrency?
Is there any other place, event or technique to, for each site, execute a piece of code before proceding with the archive but making sure its execution mutually excluded for the site?

@tsteur
Copy link
Member

tsteur commented Dec 13, 2019

Have a sleep between the launch of each cron archiver... like sleep 3... if you have them in crontab you can do

sleep 3 && ...
sleep 6 && ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants