bookmarks icon indicating copy to clipboard operation
bookmarks copied to clipboard

performing search crashes server

Open frayos opened this issue 8 months ago • 1 comments

Describe the bug same as #2110

When I perform a or multiple search on the Bookmarks app interface, the handles on the server start going up seriously until it crashes. Other symptom after 4/5 searches, config.php gets emptied to

<?php
$CONFIG = array (
  'instanceid' => 'ocunubmbvlzt',
);

Server has 4 core 10G RAM

Same as previous issue "I would guess typing in the search bar sends dozens (if not thousands?) of requests simultaneously for some reason, with which the server cannot cope."

OS: RHEL 8

  • HTTP server: HAProxy 3.0.8 + Apache HTTPD 2.4.3.7
  • Database: MariaDB 10.6.21 + Maxscale 23.08.1
  • PHP version: 8.2.20
  • Nextcloud version: 30.0.10.2
  • Bookmarks app version: 15.1.0
  • Activated Nextcloud Apps:
Enabled:
 - activity: 3.0.0
 - admin_audit: 1.20.0
 - announcementcenter: 7.1.0
 - bookmarks: 15.1.0
 - bruteforcesettings: 3.0.0
 - calendar: 5.2.2
 - circles: 30.0.0
 - cloud_federation_api: 1.13.0
 - comments: 1.20.1
 - contacts: 7.0.6
 - contactsinteraction: 1.11.0
 - dav: 1.31.1
 - federatedfilesharing: 1.20.0
 - federation: 1.20.0
 - files: 2.2.0
 - files_downloadlimit: 3.0.0
 - files_external: 1.22.0
 - files_pdfviewer: 3.0.0
 - files_reminders: 1.3.0
 - files_sharing: 1.22.0
 - files_versions: 1.23.0
 - files_versions_s3: 1.1.0
 - firstrunwizard: 3.0.0
 - impersonate: 1.17.1
 - logreader: 3.0.0
 - lookup_server_connector: 1.18.0
 - nextcloud_announcements: 2.0.0
 - notifications: 3.0.0
 - oauth2: 1.18.1
 - onlyoffice: 9.8.0
 - password_policy: 2.0.0
 - privacy: 2.0.0
 - provisioning_api: 1.20.0
 - recommendations: 3.0.0
 - related_resources: 1.5.0
 - security_guard: 2.3.0
 - serverinfo: 2.0.0
 - settings: 1.13.0
 - sharebymail: 1.20.0
 - support: 2.0.0
 - survey_client: 2.0.0
 - systemtags: 1.20.0
 - text: 4.1.0
 - theming: 2.6.0
 - theming_customcss: 1.18.0
 - twofactor_admin: 4.8.0
 - twofactor_backupcodes: 1.19.0
 - twofactor_totp: 12.0.0-dev
 - updatenotification: 1.20.0
 - user_ldap: 1.21.0
 - user_saml: 6.3.0
 - viewer: 3.0.0
 - workflowengine: 2.12.0
Disabled:
 - app_api: 4.0.6 (installed 4.0.6)
 - dashboard: 7.10.0 (installed 7.0.0)
 - encryption: 2.18.0
 - files_confidential: 3.1.0
 - files_lock: 30.0.2
 - files_trashbin: 1.20.1 (installed 1.6.0)
 - globalsiteselector: 2.6.1
 - photos: 3.0.2 (installed 1.1.0)
 - suspicious_login: 8.0.0
 - twofactor_nextcloud_notification: 4.0.0
 - user_status: 1.10.0 (installed 1.1.1)
 - weather_status: 1.10.0 (installed 1.1.0)
 - webhook_listeners: 1.1.0-dev (installed 1.1.0-dev)

  • Nextcloud configuration:
{
   "system": {
       "simpleSignUpLink.shown": false,
       "quota_include_external_storage": false,
       "overwrite.cli.url": "https:\/\/nextcloud-pprod.yyyyy.xxxx.fr\/",
       "overwriteprotocol": "https",
       "passwordsalt": "***REMOVED SENSITIVE VALUE***",
       "secret": "***REMOVED SENSITIVE VALUE***",
       "instanceid": "***REMOVED SENSITIVE VALUE***",
       "version": "30.0.10.2",
       "installed": true,
       "dbtype": "mysql",
       "objectstore_multibucket": {
           "class": "\\OC\\Files\\ObjectStore\\S3",
           "arguments": {
               "num_buckets": 64,
               "hostname": "s3r-tls.yyyyy.xxxx.fr",
               "bucket": "nextcloudpprodtlse",
               "autocreate": true,
               "key": "***REMOVED SENSITIVE VALUE***",
               "secret": "***REMOVED SENSITIVE VALUE***",
               "port": 443,
               "use_ssl": true,
               "region": "us-east-1",
               "use_path_style": true
           }
       },
       "theme": "noExtStorageNav",
       "hashingMemoryCost": 65536,
       "hashingTimeCost": 1,
       "hashingThreads": 1,
       "appstoreenabled": false,
       "dbname": "***REMOVED SENSITIVE VALUE***",
       "dbhost": "***REMOVED SENSITIVE VALUE***",
       "dbport": "",
       "dbtableprefix": "oc_",
       "dbuser": "***REMOVED SENSITIVE VALUE***",
       "dbpassword": "***REMOVED SENSITIVE VALUE***",
       "default_language": "fr",
       "logtimezone": "Europe\/Paris",
       "filelocking.enabled": true,
       "memcache.locking": "\\OC\\Memcache\\Redis",
       "memcache.distributed": "\\OC\\Memcache\\Redis",
       "redis.cluster": {
           "seeds": "***REMOVED SENSITIVE VALUE***",
           "timeout": 0,
           "read_timeout": 0,
           "failover_mode": 1
       },
       "memcache.local": "\\OC\\Memcache\\APCu",
       "mail_smtpmode": "smtp",
       "mail_smtpauthtype": "LOGIN",
       "mail_smtpport": "587",
       "mail_from_address": "***REMOVED SENSITIVE VALUE***",
       "mail_domain": "***REMOVED SENSITIVE VALUE***",
       "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
       "mail_smtpsecure": "tls",
       "mail_sendmailmode": "smtp",
       "mail_smtpauth": 1,
       "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
       "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
       "htaccess.RewriteBase": "\/",
       "log_type": "syslog",
       "syslog_tag": "nextcloud",
       "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
       "loglevel": "1",
       "skeletondirectory": "",
       "activity_expire_days": "14",
       "enable_previews": false,
       "preview_max_x": "1024",
       "preview_max_y": "768",
       "preview_max_scale_factor": "5",
       "auth.bruteforce.protection.enabled": true,
       "mysql.utf8mb4": true,
       "enabledPreviewProviders": [
           "OC\\Preview\\PNG",
           "OC\\Preview\\JPEG",
           "OC\\Preview\\GIF",
           "OC\\Preview\\BMP",
           "OC\\Preview\\XBitmap",
           "OC\\Preview\\PDF",
           "OC\\Preview\\TXT",
           "OC\\Preview\\MarkDown",
           "OC\\Preview\\MP3",
           "OC\\Preview\\Movie"
       ],
       "ldapIgnoreNamingRules": false,
       "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
       "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
       "trusted_domains": [
           "nextcloud-pprod.stockage.xxx.fr",
           "vmi-root-104.dctlse.xxx.fr",
           "vmi-root-107.dctlse.xxx.fr",
           "vmi-root-144.dctlse.xxx.fr",
           "nextcloud-pprod.stockage.xxx.fr"
       ],
       "forwarded_for_headers": [
           "HTTP_X_FORWARDED_FOR"
       ],
       "config_is_read_only": true,
       "onlyoffice": {
           "editors_check_interval": 0
       },
       "default_phone_region": "FR",
       "maintenance_window_start": 1,
       "knowledgebase.embedded": true
   }
}

  • Nextcloud external user backend: LDAP with a lot of users + SSO SAML

In any case, other NC search functionality works in other application without crashing the server

A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Bookmap app'
  2. Create a bookmark folder and put a bookmark inside
  3. share
  4. look for users without validating : paul, delete, seb, delete, matthieu, delete, emil,

Apache log What is interesting is the queries before the crashes occur, I see 300 in less than a minute GET /avartar request and the first 500 is a GET /avatar/XXXX

Nextcloud log excerpt when issue occured : Failed to open stream: Too many open files in system in /var/www/nextcloud/lib/composer/composer/ClassLoader.php Too many open files in system at /var/www/nextcloud/lib/private/L10N/L10N.php Nothing notable before

I may not know enough but I wonder if the search results shouldn't be limited to X entries to avoid too much loading and maybe start searching after 1 or 2 seconds without typing text ?

Good luck and thank you for your app and help Younes SAMMOUR

frayos avatar Apr 30 '25 06:04 frayos

Hello :wave:

Thank you for taking the time to open this issue with the bookmarks app. I know it's frustrating when software causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at and if possible solved. I'm Marcel and have been maintaining this software the last few years. I currently work for Nextcloud but maintain this app in my free time, because it is not an official Nextcloud product. My day job at Nextcloud is pretty awesome but sadly leaves me with less time for side projects like this one than I used to have. I still try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it. Until then, please be patient. Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can collaborate to make this software better. For everyone. Thus, if you can, you could also look at other issues to see whether you can help other people with your knowledge and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and try to fix the odd bug yourself. Everyone will be thankful for extra helping hands! One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum, to twitter or somewhere else. But this is a technical issue tracker, so please make sure to focus on the tech and keep your opinions to yourself. (Also see our Code of Conduct. Really.)

I look forward to working with you on this issue Cheers :blue_heart:

github-actions[bot] avatar Apr 30 '25 06:04 github-actions[bot]

Thank you for taking the time to give feedback!

https://github.com/nextcloud/bookmarks/issues/2110 is about the bookmarks search, while this issue appears to be about the user search. I will look into this!

marcelklehr avatar Jul 27 '25 12:07 marcelklehr

This will be fixed in the next release! Thank you for your patience :)

marcelklehr avatar Jul 27 '25 12:07 marcelklehr