Server: NC12.0.0 + PHP-fpm + Calender-App = 100% CPU usage

Created on 7 Jul 2017  路  23Comments  路  Source: nextcloud/server

Most helpful comment

I have submitted a PR at fruux/sabre-vobject#383.

All 23 comments

After a LOT of stepping, I have found the cause in my case.

For me, there is a recurring event in my calendar with the following rule:

array (
  'FREQ' => 'YEARLY',
  'BYYEARDAY' => '360',
  'INTERVAL' => '1',
)

This recurrence is wrong and highly unusual. It is december 26 on normal years, and december 25 on leap years.

When determining the next event a bug occurs here: [RRuleIterator].

$this->currentDate can (and is in my case) a DateTimeImmutable, so the calls to setDate, add and sub do not do anything. They should be of the form $date = $date->setDate(...).

Changing this seems to relieve all my errors.
I would like to submit a pull request for this bugfix, but am unsure where.

I have submitted a PR at fruux/sabre-vobject#383.

I confirm that this seems to solve my issue too.

Confirmed. Thanks for the fix.

I can confirm the issue is still in Nextcloud 12.0.3, and this fix resolves the issue for me.

Will nextcloud patch their version of vobject with https://github.com/sabre-io/vobject/pull/383 ? Or do we wait forever on sabre to merge this?

@here, since the fix is merged in sabre/vobject, could nextcloud make use of the 4.1.4 version ?

Workaround for now:
edit ./3rdparty/sabre/vobject/lib/Recur/RRuleIterator.php
and change the three lines like this commit does: here

Yes, there are workarounds. The question is if Nextcloud will, at some point, include one of these into their project. The workaround you mentioned is from July 2017 already as well.

This issue hasn't changed and still is around in NC 12.0.5 and I guess as well in 13.x. Are there plans to officially integrate the "workarounds"?

I can confirm that the issue is still present in NC 13.0.1, and the workaround seems to solve.
I hope it will be included into the next NC stable version

Just upgraded via several stops from NC10 to NC13 and ran into this issue. https://github.com/sabre-io/vobject/pull/383 fixes the issue. Would be great to have this integrated...

This issue is still affecting NC 13.0.2. I have confirmed the changes from sabre-io/vobject#383 fixes it for me using the latest official nextcloud docker container.
Given this is low hanging fruit for an extremely annoying problem, what would it take to get this resolved for the next point release of NC 13?
I also see this is flagged with the "dav" label, however I was able to reliably recreate the issue by visiting the calendar view of the web interface, with no DAV involved.

It would really be nice if this was fixed... I'm not looking forward to edit php files after an update so calendar functionality remains usable.

Just updated to 13.0.4 and error is still there...

https://github.com/nextcloud/3rdparty/tree/master/sabre has to be updated to the latest sabre code.
Unfortunately sabre is pretty much dead and I believe the nc devs just do not know how to proceed.

In any case an update to the 3rdparty repo with the latest sabre code would help a lot.

@mvdnes you could try to create another PR for the 3rdparty repo.

It's up at nextcloud/3rdparty#123

awesome, fingers crossed that the nc devs merge it soon ;-)

14.0.1 - still not fixed even though patch is available for a long time... :(

This issue should be fixed in 15.0.0 with this merge of upstream changes: https://github.com/nextcloud/3rdparty/commit/085494c2ad5c3757f9f1c11945f786d63fb2d40f#diff-c71f16342a1f92c11c6814945ca5d2e8R595

Thank you for heads up :+1:

Was this page helpful?
0 / 5 - 0 ratings