-
Notifications
You must be signed in to change notification settings - Fork 244
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
Browser tab hangs when loading calendar #4758
Comments
I had the same experience when upgrading from version 24 to version 27 (and also using Postgres). I also noticed that it doesn't happen for all users - presumably only for users with more than a certain number of calendars or calendar items?? I traced the problem to a query that postgres cannot complete in a time: SELECT
"c"."id",
"c"."calendardata",
"c"."componenttype",
"c"."uid",
"c"."uri"
FROM
"oc_calendarobjects" "c"
WHERE
("deleted_at" IS NULL)
AND (
"c"."id" IN (
SELECT
DISTINCT "op"."objectid"
FROM
"oc_calendarobjects_props" "op"
WHERE
("op"."calendarid" = 225)
AND ("op"."calendartype" = 0)
AND ("c"."classification" = 0)
AND ("op"."name" = 'CATEGORIES')
)
);
It is not well-optimized. This version works much better in postgres: SELECT
"c"."id",
"c"."calendardata",
"c"."componenttype",
"c"."uid",
"c"."uri"
FROM
"oc_calendarobjects" "c"
WHERE
("deleted_at" IS NULL)
AND c.classification = 0
AND (
"c"."id" IN (
SELECT
DISTINCT "op"."objectid"
FROM
"oc_calendarobjects_props" "op"
WHERE
("op"."calendarid" = 225)
AND ("op"."calendartype" = 0)
AND ("op"."name" = 'CATEGORIES')
)
);
I fixed the Nextcloud code with the following:
Would be curious to know if this resolves the issue for you. |
That patch makes a lot of sense. It's strange that we use the classification condition in the sub query on the properties table. Could you please submit this as PR against https://github.com/nextcloud/server? Thanks 🙏 |
I just loaded up my calendar to see if I was still having this problem and I am not, so probably wouldn't be worth pulling the patch in. Looks like it might help others though if it gets merged 👍 |
Let's get it in |
Great - glad it is helpful. Let me know if there is anything else I can do. |
see nextcloud/calendar#4758 Signed-off-by: Jamie McClelland <[email protected]>
see nextcloud/calendar#4758 Signed-off-by: Jamie McClelland <[email protected]>
see nextcloud/calendar#4758 Signed-off-by: Jamie McClelland <[email protected]>
see nextcloud/calendar#4758 Signed-off-by: Jamie McClelland <[email protected]>
see nextcloud/calendar#4758 Signed-off-by: Jamie McClelland <[email protected]>
Fixed in nextcloud/server#39741 |
Steps to reproduce
Expected behavior
Browser tab should not freeze and allow me to use calendar app.
Actual behaviour
Unable to select anything in calendar as the tab is frozen.
Calendar app version
4.1.0
CalDAV-clients used
DAVx5
Browser
Firefox (Linux) 107.0, Chromium (Linux) 107.0.5304.87, Fennec/Firefox (Android) 105.1.0
Client operating system
Void Linux (x86_64-glibc), Android 11
Server operating system
Void Linux (x86_64-glibc)
Web server
Other
Database engine version
PostgreSQL
PHP engine version
PHP 8.1
Nextcloud version
25.0.1
Updated from an older installed version or fresh install
Updated from an older version
List of activated apps
Nextcloud configuration
Web server error log
No response
Log file
No response
Browser log
Additional info
Using caddy 2.6.2 as webserver.
The text was updated successfully, but these errors were encountered: