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

Pruning extra revisions fail [3.7.45]: #11507

Open
DavidKabelitz opened this issue Jun 27, 2022 · 10 comments
Open

Pruning extra revisions fail [3.7.45]: #11507

DavidKabelitz opened this issue Jun 27, 2022 · 10 comments

Comments

@DavidKabelitz
Copy link

What happened?

Hi,
we have about 300 errors a day at the queue manager. Always related to different entries but always the same error message.

Not sure what the problem is.

Thanks David

Bildschirmfoto 2022-06-27 um 13 40 04

0

Craft CMS version

3.7.45

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Plugins in use: Cloudflare 1.1

@brandonkelly
Copy link
Member

Try searching through storage/logs/queue.log (and any other queue.log.X files) for that error. Does it show up? If so please post the full stack trace that follows it.

@DavidKabelitz
Copy link
Author

Yes it's there:

2022-06-27 17:48:31 [-][-][-][info][craft\queue\QueueLogBehavior::beforeExec] [1976457] Pruning extra revisions (attempt: 1, pid: 21062) - Started 2022-06-27 17:48:34 [-][-][-][error][craft\queue\QueueLogBehavior::afterError] [1976457] Pruning extra revisions (attempt: 1, pid: 21062) - Error (time: 3.084s): Unable to acquire a lock for file "/var/www/craft/storage/logs/cloudflare.log".

@DavidKabelitz
Copy link
Author

or do you need the whole file? It's 8MB big

@brandonkelly
Copy link
Member

I just need a stack trace. Is there one that follows the log you posted? If not try searching for other instances of the error message.

@DavidKabelitz
Copy link
Author

DavidKabelitz commented Jun 28, 2022

it's always just like that:
2022-06-26 12:13:19 [-][-][-][info][craft\queue\QueueLogBehavior::beforeExec] [1971338] Pruning extra revisions (attempt: 1, pid: 15663) - Started 2022-06-26 12:13:22 [-][-][-][error][craft\queue\QueueLogBehavior::afterError] [1971338] Pruning extra revisions (attempt: 1, pid: 15663) - Error (time: 3.083s): Unable to acquire a lock for file "/var/www/craft/storage/logs/cloudflare.log".

@DavidKabelitz
Copy link
Author

DavidKabelitz commented Jun 28, 2022

just to inform you...after restarting all these errors again it works and they are gone. So looks like a timing issue ...

@angrybrad
Copy link
Member

@DavidKabelitz do you have multiple queue runners processing the queue or just one? Is this in a load-balanced environment?

@DavidKabelitz
Copy link
Author

@angrybrad yes we are running on kubernetes with multiple pods and also a load balancer

@angrybrad
Copy link
Member

@DavidKabelitz How are the queue runner(s) set up? Using Craft's default web-based queue runner, so each pod ends up being a queue runner? Or is there a dedicated pod just for deamonizing craft to process the queue?

@DavidKabelitz
Copy link
Author

Yes it's the default web based queue runner.
In that case we solved it and removed the queue runner cause we already had cron jobs running with schedules.

su www-data -c "/usr/local/bin/php /var/www/craft/craft queue/run"

So for a better / clean setup a dedicated pod for the queue would be the solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants