After update from 11 to 12 (and now stll from 13.0.5 to 13.0.6) : Calendar loading infinitly (and php-fpm 100% CPU usage)

Hello,

I upgraded NC some days ago from 11.0.3 to 12 BETA3 and moved back because of calendar loading problems.

Yesterday I updated again 11.0.3 to 12 final (over Beta channel) and am still having the same calendar problem:

  1. ā€œCalendar loadingā€¦ā€ icon turning endlessly, not loading calendar.
  2. ā€œphp-fpmā€ eating up an entire CPU of the VM. This happens per loaded calendar instance, when I start multiple sessions in same or different browser, each php-fpm eats up 100% of a CPU.

I have tried to avoid my reverse proxy for troubleshooting and browsed directly to http:/ip-of-server , but same problem.

System VM:

  • Debian 9 - SMP Debian 3.16.43-2
  • Apache/2.4.10 (Debian)
  • PHP 7.0.19-1~dotdeb+8.1
  • $OC_Version = array(12,0,0,27);
  • $OC_Build = '2017-05-21T15:21:48+00:00

Clients:

  • Browsers used: Firefox 53.0.2 x64, Iridium 58
  • Browsing OS: Win7, Deb 9
  • CalDav Synchronisation has aswell a problem.

ā€œtopā€ on NC server:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1730 web-user 20 0 730064 62816 43576 R 100.0 4.9 3:44.48 php-fpm: pool www +
1813 web-user 20 0 728080 59952 42656 S 2.0 4.7 1:13.36 php-fpm: pool www +
1210 web-user 20 0 727156 55436 40616 S 1.7 4.3 1:24.42 php-fpm: pool www +

FF console outputs (relevant?):

Content Security Policy: The pageā€™s settings blocked the loading of a resource at http://nc.domain.tld/index.php/apps/theming/logo?v=43 (ā€œimg-src https://nc.domain.tld data: blob:ā€).

Content Security Policy: The pageā€™s settings blocked the loading of a resource at http://nc.domain.tld/apps/updatenotification/img/notification.svg (ā€œimg-src https://nc.domain.tld data: blob:ā€).

PROPFIND
XHR
https://nc.domain.tld/remote.php/dav/calendars/ncuser01/ [HTTP/1.1 207 Multi-Status 50ms]
Headers
POST
Response
Cookies
Call Stack
Cache-Controlno-store, no-cache, must-revalidateConnectionKeep-AliveContent-Security-Policydefault-src ā€˜noneā€™;Content-Typeapplication/xml; charset=utf-8DAV1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, calendar-access, calendar-proxy, calendar-auto-schedule, calendar-availability, calendarserver-subscribed, oc-resource-sharing, oc-calendar-publishing, calendarserver-sharing, addressbook, nc-calendar-searchDateMon, 22 May 2017 06:39:09 GMTExpiresThu, 19 Nov 1981 08:52:00 GMTKeep-Alivetimeout=5, max=88Pragmano-cacheServerApache/2.4.10 (Debian)Strict-Transport-Securitymax-age=15552000; includeSubDomains; preloadTransfer-EncodingchunkedVaryBrief,PreferX-Content-Type-OptionsnosniffX-Download-OptionsnoopenX-Frame-OptionsSAMEORIGINX-Permitted-Cross-Domain-PoliciesnoneX-Robots-TagnoneX-XSS-Protection1; mode=block

Accept*/*Accept-Encodinggzip, deflate, brAccept-Languageen-US,en;q=0.5Connectionkeep-aliveContent-Length658Content-Typeapplication/xml; charset=utf-8Cookieochidghtcad7=ltj4tpehpsoejvaf6ftrp24me7; oc_sessionPassphrase=M5YO7jhJxKwiftsOVuWUdQhOG7aoMWC3SCBZ3u28MBPLi518hcz4DTqp%2F0fVCvxNvUd%2FXuWt%2Bgd%2FpmV76wzgGdELiSLw5oJHo68A0FdLRjljtjxj%2BeCURLpu2i%2BwxmGq; nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=trueDepth1Hostnc.domain.tldUser-AgentMozilla/5.0 (Windows NT 6.1; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0requesttokenzO4QoxN+hT4DG70uikO0X1inTko+sa9hyI2XzfJ+vFY=:pYRl0Fgr7hVuWelE0CTRLx79FAVvgZpZjO//vJY8ywE=

REPORT XHR https://nc.domain.tld/remote.php/dav/calendars/ncuser01/default%20calendar/ [HTTP/1.1 503 Service Unavailable 300106ms]

Does anyone have a clue what that could be? Thanks for a hint.

Iā€™ll be reverting back to working 11.0.3 snapshot for now.

regards

@oparoz For the PHP-FPM stuff.

bump
thanks

This is a similar problem
https://help.nextcloud.com/t/calendar-is-not-showing-anymore/5780/7

by me works this:
ALTER TABLE oc_dav_shares ADD publicuri VARCHAR(255) NOT NULL AFTER principaluri;

from here
https://github.com/owncloud/core/issues/27754

Hi,
I have a similar problem with my calendar.

FF does not get an answer:
REPORT XHR https:///remote.php/dav/calendars//default%20calendar/

and the cpu is busyā€¦

The table ā€œoc_dav_sharesā€ is correct.
Iā€™ve been using calendar-app since owncloud.
Nextcloud version 11.0.3 works fineā€¦

Hi @werki - Iā€™m right now on a trip to check @steffen s hint, and since his posting I had to reconfigure my nextcloud DB, killed my nextcloud VM, because I updated my cluster (another challenge), had some other infrastructure problems and was only able to restore the VM 5 mins agoā€¦ man, man :wink:

So iā€™ll now be able to try to add the ā€˜publicuriā€™ field to ā€˜oc_dav_sharesā€™ and let you know.

edit: I will not try to add the column, as I just saw you do have that field and it still doesnā€™t work.

Itā€™s strangeā€¦
I have two calendars, one is working and the other does not work.
I can add new calendar without any problems.

Yeah, my second ā€œbirthdayā€ calendar works as wellā€¦ but not the first, main one.

really strange

I found this debug message:

{ā€œreqIdā€:ā€œICgV9TItYUixHmTXZx44ā€,ā€œlevelā€:0,ā€œtimeā€:ā€œ2017-05-24T21:47:36+00:00ā€,ā€œremoteAddrā€:ā€œ12.34.56.78ā€,ā€œuserā€:"ā€“",ā€œappā€:ā€œwebdavā€,ā€œmethodā€:ā€œREPORTā€,ā€œurlā€:"/remote.php/dav/calendars/user/default%20calendar/",ā€œmessageā€:ā€œException: {ā€œMessageā€:ā€œHTTP\/1.1 401 No public access to this resource., No ā€˜Authorization: Bearerā€™ header found. Either the client didnā€™t send one, or the server is mis-configured, No ā€˜Authorization: Basicā€™ header found. Either the client didnā€™t send one, or the server is misconfiguredā€,ā€œExceptionā€:ā€œSabre\\DAV\\Exception\\NotAuthenticatedā€,ā€œCodeā€:0,ā€œTraceā€:ā€#0 [internal function]: Sabre\\DAV\\Auth\\Plugin->beforeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#1 \/srv\/http\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#2 \/srv\/http\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(466): Sabre\\Event\\EventEmitter->emit(ā€˜beforeMethodā€™, Array)\n#3 \/srv\/http\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#4 \/srv\/http\/nextcloud\/apps\/dav\/lib\/Server.php(253): Sabre\\DAV\\Server->exec()\n#5 \/srv\/http\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php(33): OCA\\DAV\\Server->exec()\n#6 \/srv\/http\/nextcloud\/remote.php(162): require_once(ā€™\/srv\/http\/nextcā€¦ā€™)\n#7 {main}",ā€œFileā€:"\/srv\/http\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Auth\/Plugin.php",ā€œLineā€:168,ā€œUserā€:false}",ā€œuserAgentā€:ā€œMozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0ā€,ā€œversionā€:ā€œ12.0.0.29ā€}

So maybe these issues are indeed linked:

After a new attempt to upgrade 11.0.3 to 12.0.final, calendar loading still doesnā€™t complete and php-fpm CPU usage still goes to 100% (per calendar loading attempt).

FF Console additionally shows:
Error in parsing value for ā€˜topā€™. Declaration dropped. calendar
Error in parsing value for ā€˜leftā€™. Declaration dropped. calendar

And:
ā€œ
JQMIGRATE: Migrate is installed, version 1.4.0 core.js:7:542
"Deprecation warning: use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.ā€ core.js:1563:2834
/remote.php/dav/calendars/ncuser01/defaultalendar/
"

ā€œ/defaultalendar/ā€ ?? for ā€œDefault Calendarā€?? Is there something missing? Or is there something about a NC message, just after upgrade, for MySQL like ā€œconvert to UTF8ā€¦ā€?

Do you have an idea, @oparoz? thanks

The same here. After Upgrade, calendar is not working anymore. Some of the calendars working, others (shared or not) infinite spin and 100% CPU Load.
This is a serious issue for me, because nextcloud-installation is prodactiv.
Is ist possible do downgrade the installation without any loss?

Iā€™m not sure, if downgrading is possible without a lot of hassleā€¦

Iā€™m lucky to be able to create VM snapshots, before I upgrade. Additionally Iā€™ve got nightly DB and data backup scripts. Without those I think Iā€™d be lost.

OK, playing arround my nextcloud, this happend:

  1. Backedup all my data
  2. export the calendars as ics-files
  3. delete all broken calendars in nc
  4. create all calendars
  5. try to import ics-files
  6. Canā€™t because of non-campatible content warning in nc-importer
  7. try to import from calendar-app (macos)
  8. broken sync, 100% CPU
  9. f*ck

My new attempt to upgrade 11.0.3 to 12.0.x still gives the same calendar loading issues. No entries in Webui Logviewer.

Webconsole shows:

JQMIGRATE: Migrate is installed, version 1.4.0  core.js:7:542
"Deprecation warning: use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."  core.js:1563:2834
/remote.php/dav/calendars/ncuser01/defaultalendar/

Config.php is configured with respect to my reverse proxy.

Has really no one an idea what this could be?

Please - could anyone investigate on this still existing calendar problem?

New attempt (after Debian php updates) to upgrade 11.0.3 to 12.0.x still results in the same not loading calendar.

JS Console:
ā€œError: Updating calendar failed app.min.js:3:23575
/remote.php/dav/calendars/ncuser01/defaultalendar/ app.min.js:2:16313ā€

How is ā€œDefault calendarā€ from Webui becoming ā€œ/defaultalendar/ā€ in the URL??

Are there any news about this issue? Thanks

I opened a issue on github. Maybe this helps.

Thanks @Hollerauer. Iā€™m curious if the Debian constellation might be the little troublemaker.

Original issue was closed because I posted it in the wrong repository. Sry

New Issue: