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

[Bug]: High web app latency (notorious nextcloud issue) #33534

Closed
6 of 9 tasks
a-0-dev opened this issue Aug 14, 2022 · 14 comments
Closed
6 of 9 tasks

[Bug]: High web app latency (notorious nextcloud issue) #33534

a-0-dev opened this issue Aug 14, 2022 · 14 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug needs info performance 🚀 stale Ticket or PR with no recent activity

Comments

@a-0-dev
Copy link

a-0-dev commented Aug 14, 2022

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

Latency of loading a nextcloud site is high, especially with the default "Files" app, which should be snappy. This is not only the case with my own installation, but also with some professionally hosted installations with way more resources.

I observed that before the "Files" app page loads (loading means, until the list of files is visible), many scripts and other files are being received. For me, the site was rendered and usable about the time the file "de.js?v=b17fbaab-0" was received (seemingly a translation file for some UI text for comments).

Before that, many other "unnecessary" things were loaded, including "/apps/dashboard" (which is very slow as an app as well), "user-status-menu.js", the nextcloud logo (which took 5s for whatever reason - and the rest of the site didn't render until it was received!) and many MANY more.

Steps to reproduce

  1. Install nextcloud
  2. Visit any app's site, e.g. "Dashboard" or "Files"
  3. Observe high latency

Expected behavior

I would expect the site to load extremely quickly, and "side features", like the user status, notifications, file comments etc. being loaded after the "main feature", like a files list, was loaded.
Alternatively, I would expect the web apps to be very quick after the first click, so much more caching on the client side or even permanent storage.

Installation method

Manual installation

Operating system

Debian/Ubuntu

PHP engine version

PHP 7.4

Web server

Apache (supported)

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

No response

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.first.localip",
            "192.168.second.localip",
            "my.domain.tld"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "allow_local_remote_servers": true,
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "24.0.4.1",
        "overwriteprotocol": "https",
        "overwrite.cli.url": "http:\/\/192.168.second.localip\/nextcloud",
        "htaccess.RewriteBase": "\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "has_rebuilt_cache": true,
        "theme": "",
        "loglevel": 2,
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "updater.release.channel": "stable",
        "default_phone_region": "DE",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "app_install_overwrite": [
            "previewgenerator"
        ],
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60"
    }
}

List of activated Apps

Enabled:
  - accessibility: 1.10.0
  - activity: 2.16.0
  - announcementcenter: 6.3.1
  - calendar: 3.4.2
  - circles: 24.0.1
  - cloud_federation_api: 1.7.0
  - comments: 1.14.0
  - contacts: 4.2.0
  - contactsinteraction: 1.5.0
  - dashboard: 7.4.0
  - dav: 1.22.0
  - extract: 1.3.5
  - federatedfilesharing: 1.14.0
  - federation: 1.14.0
  - files: 1.19.0
  - files_pdfviewer: 2.5.0
  - files_rightclick: 1.3.0
  - files_sharing: 1.16.2
  - files_trashbin: 1.14.0
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - firstrunwizard: 2.13.0
  - gpoddersync: 3.4.0
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - maps: 0.2.0
  - nextcloud_announcements: 1.13.0
  - notifications: 2.12.0
  - oauth2: 1.12.0
  - password_policy: 1.14.0
  - phonetrack: 0.7.0
  - photos: 1.6.0
  - previewgenerator: 5.0.0
  - privacy: 1.8.0
  - provisioning_api: 1.14.0
  - recommendations: 1.3.0
  - serverinfo: 1.14.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - spreed: 14.0.4
  - support: 1.7.0
  - survey_client: 1.12.0
  - systemtags: 1.14.0
  - tasks: 0.14.4
  - text: 3.5.1
  - theming: 1.15.0
  - twofactor_backupcodes: 1.13.0
  - updatenotification: 1.14.0
  - user_status: 1.4.0
  - viewer: 1.8.0
  - weather_status: 1.4.0
  - workflowengine: 2.6.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - quota_warning: 1.14.0
  - richdocuments: 6.1.1
  - richdocumentscode: 22.5.301
  - user_ldap

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

no logs.

Additional info

No response

@a-0-dev a-0-dev added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Aug 14, 2022
@a-0-dev a-0-dev changed the title [Bug]: High latency (notorical nextcloud issue) [Bug]: High web app latency (notorious nextcloud issue) Aug 14, 2022
@bastiencyr
Copy link

Hello @a-0-dev ,
I dont want to open a new issue so I post here a related issue about the dashboard. "/apps/dashboard" is really slow to load but what is even worse is that NC load all integrations before loading the top menu bar. It means that a user has to wait that the dashboard is completely loaded to access his files unless he knows the url to the files app or the admin has deactivated the dashboard.
So it would be great if the top menu bar is loaded before integration !

@szaimen
Copy link
Contributor

szaimen commented Jan 23, 2023

Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!

My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!

If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+

@a-0-dev
Copy link
Author

a-0-dev commented Jan 23, 2023

I can confirm the situation has not changed (for my installation) after upgrading to version 25.0.3.

@szaimen
Copy link
Contributor

szaimen commented Jan 23, 2023

So is it improved for you and can we this close the issue?

@a-0-dev
Copy link
Author

a-0-dev commented Jan 23, 2023

It is just as bad as it was before... It's not unbearable but definitely uncomfortable

@szaimen
Copy link
Contributor

szaimen commented Jan 23, 2023

I see you dont have redis configured. Please follow https://docs.nextcloud.com/server/stable/admin_manual/installation/server_tuning.html in order to improve the situation.

Apart from that you could try out https://github.com/nextcloud/all-in-one which should have all performance tuning out of the box.

@a-0-dev
Copy link
Author

a-0-dev commented Jan 23, 2023

I used the server tuning manual to tweak my installation of course. It's still rather slow :/ My server environment does not allow me to use the all-in-one solution as I'm using a separate reverse proxy etc.

@szaimen
Copy link
Contributor

szaimen commented Jan 23, 2023

as I'm using a separate reverse proxy

That ahiuld not be a problem: https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md

@a-0-dev
Copy link
Author

a-0-dev commented Jan 23, 2023

Ok, I will have a look at it when I have time. Not sure how easy it is to migrate from a longer-running instance to AIO, but we'll see.

@a-0-dev
Copy link
Author

a-0-dev commented Jan 23, 2023

Still, I know a few people running a Nextcloud instance, the original issue here also got some thumbs up. I guess it's not solely an issue of my installation. I'm sorry I can't provide any more useful information as far as I know

@szaimen
Copy link
Contributor

szaimen commented Jan 23, 2023

@DavideTedesco
Copy link

Hi there @szaimen, I'm also having slow loading time issues, but only for one particular user which has more than 100 folders in the main folder and ~300 GB of files. The other users function snappy as always, I was on 24.0.9 with the issue and updated to 25.0.3, the issue still persists.
Searching for the issue I discovered that the PROPFIND request needs at least 3/4 minutes to load the entire list of files, as mentioned in the image.

image

What could it be that really slow down the PROPFIND request? Are there any limitations on the number of files/folders that a the main files folder should have?

I switched on Redis on a Ubuntu Server installed through web installer (since I don't have access to command line) with PHP version 8.1, nothing changed with Redis switched on!

@joshtrichards
Copy link
Member

the nextcloud logo (which took 5s for whatever reason - and the rest of the site didn't render until it was received!)

Can we provide more of your browser console output (such as the Network tab with the Timeline column)?

I used the server tuning manual to tweak my installation of course. It's still rather slow :/
[...]
Still, I know a few people running a Nextcloud instance, the original issue here also got some thumbs up. I guess it's not solely an issue of my installation. I'm sorry I can't provide any more useful information as far as I know

Performance has many factors and there's always room for improvement. There are regular improvements occurring. See #39937 for a recent example. I don't think anyone involved in the project is going to take their eye off the idea of improving performance. It's a constant... battle/adventure! :)

@DavideTedesco Your situation may have seen some enhancement in newer releases (NC27) or beta ones (NC27.1) and upcoming ones (NC28), but it's hard to tell with certainty. There have been a variety of PROPFIND and View related optimizations made.

@nextcloud-command
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@nextcloud-command nextcloud-command added the stale Ticket or PR with no recent activity label Oct 30, 2023
@nextcloud-command nextcloud-command closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug needs info performance 🚀 stale Ticket or PR with no recent activity
Projects
None yet
Development

No branches or pull requests

6 participants