nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.22k stars 4.05k forks source link

nextcloud handled only few request though server has enough resources #16054

Closed nirajvara closed 3 years ago

nirajvara commented 5 years ago

Steps to reproduce

  1. installed nextcloud 14 on centos 7
  2. upload 2000 files size of 500k. Server handled only 5-8 request per second
  3. upload 2000 files size of 1k. Server handled only 5-8 request per second no different after changed the file size.

Expected behaviour

I have Increase the apache start servers and php-fpm start servers also but no effect of it. nextcloud only handeled the 5-8 request/s. As I increased the server parameters and server have enough resource then after nextcloud only accepts/handled few requests. It seems bottleneck of nextcloud.

Actual behaviour

Tell us what happens instead nextcloud only handeled the 5-8 request/s.

Server configuration

Operating system: centos 7 Web server: apache 2.4.6 Database: mysql 5.6.41

PHP version: PHP 7.3.6 Nextcloud version: (see Nextcloud admin page) nextcloud 14.0.4 Updated from an older Nextcloud/ownCloud or fresh install: fresh install Where did you install Nextcloud from: nextcloud site download Signing status:

Signing status ``` Login as admin user into your Nextcloud and access http://example.com/index.php/settings/integrity/failed my url output https://cloud.xxx.care/index.php/settings/integrity/failed No errors have been found. ```

List of activated apps:

App list Accessibility 1.2.0 Official Activity 2.9.1 Official Antivirus for files 2.2.0 Auditing / Logging 1.6.0 Official Checksum 0.4.3 Collaborative tags 1.6.0 Official Comments 1.6.0 Official Default encryption module 2.4.0 Official Deleted files 1.6.0 Official DICOM Viewer 1.2.0 Federation 1.6.0 Official File sharing 1.8.0 Official Files From Mail 0.3.0 First run wizard 2.5.0 Official Flow Upload 0.1.2 Gallery 18.3.0 Official Log Reader 2.1.0 Official Monitoring 1.6.0 Official Nextcloud announcements 1.5.0 Official Notifications 2.4.1 Official Password policy 1.6.0 Official PDF viewer 1.5.0 Official Plain text editor 2.8.0 Official Privacy 1.0.0 Official Recommendations 0.4.0 Official Right click 0.15.1 Share by mail 1.6.0 Official Support 1.0.0 Official Theming 1.7.0 Official Two-Factor Admin Support 0.4.1 Two-Factor TOTP Provider 3.0.1 Official Usage survey 1.4.0 Official Versions 1.9.0 Official Video player 1.5.0 Official Viewer ``` If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your Nextcloud installation folder Enabled: - accessibility: 1.2.0 - activity: 2.9.1 - admin_audit: 1.6.0 - checksum: 0.4.3 - cloud_federation_api: 0.2.0 - comments: 1.6.0 - dav: 1.9.2 - dicomviewer: 1.2.0 - encryption: 2.4.0 - federatedfilesharing: 1.6.0 - federation: 1.6.0 - files: 1.11.0 - files_antivirus: 2.2.0 - files_frommail: 0.3.0 - files_pdfviewer: 1.5.0 - files_rightclick: 0.13.0 - files_sharing: 1.8.0 - files_texteditor: 2.8.0 - files_trashbin: 1.6.0 - files_versions: 1.9.0 - files_videoplayer: 1.5.0 - firstrunwizard: 2.5.0 - flowupload: 0.1.2 - gallery: 18.3.0 - logreader: 2.1.0 - lookup_server_connector: 1.4.0 - nextcloud_announcements: 1.5.0 - notifications: 2.4.1 - oauth2: 1.4.2 - password_policy: 1.6.0 - privacy: 1.0.0 - provisioning_api: 1.6.0 - recommendations: 0.4.0 - serverinfo: 1.6.0 - sharebymail: 1.6.0 - support: 1.0.0 - survey_client: 1.4.0 - systemtags: 1.6.0 - theming: 1.7.0 - twofactor_admin: 0.4.1 - twofactor_backupcodes: 1.5.0 - twofactor_totp: 3.0.1 - viewer: 1.1.0 - workflowengine: 1.6.0 Disabled: - end_to_end_encryption - files_external - terms_of_service - user_ldap ```

Nextcloud configuration:

Config report ``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder { "system": { "apps_paths": [ { "path": "\/snap\/nextcloud\/current\/htdocs\/apps", "url": "\/apps", "writable": false }, { "path": "\/var\/snap\/nextcloud\/current\/nextcloud\/extra-apps", "url": "\/extra-apps", "writable": true } ], "supportedDatabases": [ "mysql" ], "memcache.locking": "\\OC\\Memcache\\Redis", "memcache.local": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0 }, "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "cloud.aiai.care" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "trashbin_retention_obligation": "disabled", "logtimezone": "America\/New_York", "loglevel": 1, "logdateformat": "F d, Y H:i:s", "dbtype": "mysql", "version": "16.0.5.1", "overwrite.cli.url": "http:\/\/cloud.aiai.care", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "maintenance": false, "twofactor_enforced": "false", "twofactor_enforced_groups": [], "twofactor_enforced_excluded_groups": [], "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtpmode": "smtp", "mail_sendmailmode": "smtp", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "mail_smtpdebug": true, "theme": "" } } or Insert your config.php content here. Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …) ```

Are you using external storage, if yes which one: local/smb/sftp/... No Are you using encryption: yes/no No Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... No

LDAP configuration (delete this part if not used)

LDAP config Not used ``` ### Client configuration **Browser:** **Operating system:** ### Logs #### Web server error log
Web server error log ``` Insert your webserver log here ```
#### Nextcloud log (data/nextcloud.log)
Nextcloud log {"reqId":"3wb3SYSkWW657hU9pJRe","level":1,"time":"October 09, 2019 02:37:52","remoteAddr":"162.158.158.93","user":"niraj","app":"admin_audit","method":"PUT","url":"\/remote.php\/dav\/files\/niraj\/newtest\/xzbun","message":"File created: \"\/newtest\/xzbun\"","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.3 (build 1) (Nextcloud)","version":"16.0.5.1"} {"reqId":"3wb3SYSkWW657hU9pJRe","level":1,"time":"October 09, 2019 02:37:52","remoteAddr":"162.158.158.93","user":"niraj","app":"admin_audit","method":"PUT","url":"\/remote.php\/dav\/files\/niraj\/newtest\/xzbun","message":"File written to: \"\/newtest\/xzbun\"","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.3 (build 1) (Nextcloud)","version":"16.0.5.1"} {"reqId":"F3aWymzdXpyrlI42PLTn","level":1,"time":"October 09, 2019 02:37:52","remoteAddr":"162.158.159.36","user":"niraj","app":"admin_audit","method":"PUT","url":"\/remote.php\/dav\/files\/niraj\/newtest\/xzbuo","message":"File created: \"\/newtest\/xzbuo\"","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.3 (build 1) (Nextcloud)","version":"16.0.5.1"} {"reqId":"F3aWymzdXpyrlI42PLTn","level":1,"time":"October 09, 2019 02:37:52","remoteAddr":"162.158.159.36","user":"niraj","app":"admin_audit","method":"PUT","url":"\/remote.php\/dav\/files\/niraj\/newtest\/xzbuo","message":"File written to: \"\/newtest\/xzbuo\"","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.3 (build 1) (Nextcloud)","version":"16.0.5.1"} {"reqId":"RdwZlrY81A7RmXoqSpRT","level":1,"time":"October 09, 2019 02:37:52","remoteAddr":"162.158.159.36","user":"niraj","app":"admin_audit","method":"PUT","url":"\/remote.php\/dav\/files\/niraj\/newtest\/xzbup","message":"File created: \"\/newtest\/xzbup\"","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.3 (build 1) (Nextcloud)","version":"16.0.5.1"} {"reqId":"RdwZlrY81A7RmXoqSpRT","level":1,"time":"October 09, 2019 02:37:52","remoteAddr":"162.158.159.36","user":"niraj","app":"admin_audit","method":"PUT","url":"\/remote.php\/dav\/files\/niraj\/newtest\/xzbup","message":"File written to: \"\/newtest\/xzbup\"","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.3 (build 1) (Nextcloud)","version":"16.0.5.1"} {"reqId":"bXpiA6WGG2zbm8UQGSs0","level":1,"time":"October 09, 2019 02:37:52","remoteAddr":"141.101.99.81","user":"niraj","app":"admin_audit","method":"PUT","url":"\/remote.php\/dav\/files\/niraj\/newtest\/xzbuq","message":"File created: \"\/newtest\/xzbuq\"","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.3 (build 1) (Nextcloud)","version":"16.0.5.1"} {"reqId":"bXpiA6WGG2zbm8UQGSs0","level":1,"time":"October 09, 2019 02:37:52","remoteAddr":"141.101.99.81","user":"niraj","app":"admin_audit","method":"PUT","url":"\/remote.php\/dav\/files\/niraj\/newtest\/xzbuq","message":"File written to: \"\/newtest\/xzbuq\"","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.3 (build 1) (Nextcloud)","version":"16.0.5.1"} {"reqId":"pBUc01I6ZQeCvFcW9sKX","level":1,"time":"October 09, 2019 02:37:52","remoteAddr":"162.158.158.97","user":"niraj","app":"admin_audit","method":"PUT","url":"\/remote.php\/dav\/files\/niraj\/newtest\/xzbur","message":"File created: \"\/newtest\/xzbur\"","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.3 (build 1) (Nextcloud)","version":"16.0.5.1"} {"reqId":"pBUc01I6ZQeCvFcW9sKX","level":1,"time":"October 09, 2019 02:37:52","remoteAddr":"162.158.158.97","user":"niraj","app":"admin_audit","method":"PUT","url":"\/remote.php\/dav\/files\/niraj\/newtest\/xzbur","message":"File written to: \"\/newtest\/xzbur\"","userAgent":"Mozi ``` Insert your Nextcloud log here ```
#### Browser log
Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
kesselb commented 5 years ago

Does this error still occur?

nirajvara commented 5 years ago

Yes

On Sat, Sep 28, 2019, 10:16 PM Daniel Kesselberg notifications@github.com wrote:

Does this error still occur?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nextcloud/server/issues/16054?email_source=notifications&email_token=AE57Y62NHWQM6H5HMYQTNMTQL6C5VA5CNFSM4H2363A2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD725UTI#issuecomment-536205901, or mute the thread https://github.com/notifications/unsubscribe-auth/AE57Y626ZFL7ZEQ5TVVZ7KTQL6C5VANCNFSM4H2363AQ .

kesselb commented 5 years ago

Ok. To investigate your problem further:

  1. Edit your post and update the issue template (please ensure that all information are up to date like the nextcloud version and add missing blocks like config report, app list, ldap yes/no, error logs).

  2. Provide some details about your system (add them to your first post). CPU and Memory for example. Please explain how apache2 runs php (mod_php, php-fpm, etc.). Is the data directory a local disk or a remote one?

  3. Please clarify steps to reproduce and the expected behaviour. How do you uploaded the files (via web or native client)? How should it work? Do you expect that all files are uploaded in parallel? For nextcloud 16 the number of concurrent uploads is 10 (https://github.com/nextcloud/server/pull/13855). I think older versions upload the files in sequential order.

nirajvara commented 5 years ago

Ok. To investigate your problem further:

  1. Edit your post and update the issue template (please ensure that all information are up to date like the nextcloud version and add missing blocks like config report, app list, ldap yes/no, error logs).
  2. Provide some details about your system (add them to your first post). CPU and Memory for example. Please explain how apache2 runs php (mod_php, php-fpm, etc.). Is the data directory a local disk or a remote one?
  3. Please clarify steps to reproduce and the expected behaviour. How do you uploaded the files (via web or native client)? How should it work? Do you expect that all files are uploaded in parallel? For nextcloud 16 the number of concurrent uploads is 10 (#13855). I think older versions upload the files in sequential order.

I have updated the missing blocks sysstem have Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz 32 processors and 256GB RAM Apache runs php-fpm root 24869 0.0 0.0 4504 1620 ? Ss 01:56 0:00 /bin/sh /snap/nextcloud/16402/bin/start-php-fpm root 25757 0.0 0.0 323400 22372 ? Ss 01:56 0:00 php-fpm: master process (/snap/nextcloud/16402/config/php/php-fpm.conf) root 31424 0.8 0.0 332120 42508 ? S 02:44 0:00 php-fpm: pool www root 31469 0.7 0.0 329924 37256 ? S 02:44 0:00 php-fpm: pool www

Data directory -- we have another hardisk which is mounted in system and partition is encrypted.

I am using the nextcloud native client and tried from AWS server via command line also. I was uploading thousand's of files and expecting files should be uploaded in nextcloud server with more than 8/sec files. it should uploade like 50/sec and 100/sec etc... as server configuration and internet speed seems to be ok but the nextcloud server only handled the request like 8/sec to 10/sec only.

So Please guide how can I increase the upload file speed withing nextcloud server.

szaimen commented 3 years ago

Sorry, this is more of a support question than a bug report. And that means you should either ask help from the volunteers on the forum at help.nextcloud.com (who can help you debug and turn it in a bug report if it is a bug) or, if this is important for your business, get a Nextcloud subscription and we help you fix it in a few hours or days (according to the SLA)