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

[Nextcloud] Workaround for hanging contacts app #1287

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

astehlik
Copy link
Contributor

See nextcloud/server#33048 for more background.

In a Nutshell:

  • The contacts app makes many requests to load contact images like /remote.php/dav/addressbooks/users/<user>/<Addressbook>/<contact-uid>.vcf?photo=
  • The ProxyErrorOverride config in Uberspace accounts hides the 404 error thrown by Nextcloud and opens the configured ErrorDocument from .htaccess
  • The default error document redirects the user to the Nextcloud start page (Dashboard)
  • This means a lot of requests are made at once to load the Nextcloud dashboard which can lead to a completely hung up Nextcloud instance until restarting the PHP service with uberspace tools restart php

@noave
Copy link
Contributor

noave commented Aug 24, 2022

I really would have liked that this bug is handled in the NC repo, but I guess that could take some time. Because we already have this section of "troubleshooting" its ok to add this workaround here. But I would ask you to remove the automatic update part and just add a hint, that this might have to be checked again after updating

@noave noave changed the title [Nexcloud] Workaround for hanging contacts app [Nextcloud] Workaround for hanging contacts app Aug 30, 2022
@entorb
Copy link
Contributor

entorb commented Oct 15, 2022

Thank you so much, that workaround fixed a headage of mine ;-)

See nextcloud/server#33048 for more background.

In a Nutshell:

* The contacts app makes many requests to load contact images like `/remote.php/dav/addressbooks/users/<user>/<Addressbook>/<contact-uid>.vcf?photo=`
* The `ProxyErrorOverride` config in Uberspace accounts hides the 404 error thrown by Nextcloud and opens the configured `ErrorDocument` from `.htaccess`
* The default error document redirects the user to the Nextcloud start page (Dashboard)
* This means a lot of requests are made at once to load the Nextcloud dashboard which can lead to a completely hung up Nextcloud instance until restarting the PHP service with `uberspace tools restart php`
@astehlik
Copy link
Contributor Author

Thank you for your feedback, @noave

I now replaced this section:


You can add these lines to the ~/bin/nextcloud-update script to make sure the workaround stays active after automated updates:

 php ~/html/occ maintenance:update:htaccess
 
 # Override default ErrorDocument directives as a workaround for
 # https://github.com/nextcloud/server/issues/33048
 {
   echo ""
   echo 'ErrorDocument 403 "Forbidden"'
   echo 'ErrorDocument 404 "Not found"'
 } >> ~/html/.htaccess

with a hint. I hope this is OK. Please let me know if I should change anything else.

@user858753257
Copy link

Is this a general bug from Nextcloud which can be fixed in the next updates ?

@astehlik
Copy link
Contributor Author

astehlik commented Dec 4, 2022

Is this a general bug from Nextcloud which can be fixed in the next updates ?

@F3000 The issue filed with Nextcloud is pending for quite some time now 😞

See: nextcloud/server#33048

@noave noave merged commit 68d98c5 into Uberspace:main Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants