Slow upload speed

Hey, I’ve installed Nextcloud 12 on my Vserver,. The specs of my server are:

1 CPU Intel Xeon CPU E5, max. 3.70GHz
DDR4, 2133MhZ, SDRAM 512

I’ve successfully installed Nextcloud with the “How to install it on Linux”. Everything looks fine but I got some problems when uploading files with it. The speed is really slow. For example: If I’m uploading 20 MB of pictures it takes about 5-6 minutes which is too much imo.

Anything I can change in order to speed my Nextcloud up?


It depends on what you have done so far.
While PHP is used for the upload you need to speed up PHP I guess. Are you already using the caching mechanism described in the documentations?
Fast-CGI (php-fpm for nginx) and redis might be helpful, but I’m not 100% sure if they really effect uploads. But for comfortable usage of the server definitely nice to have anyway.

Whenever you install a service for performance enhancement the tip in the guides is to use sockets instead of TCP services.
Here an example, two possibilities but rather use the socket option:

upstream php-handler {
server unix:/var/run/php/php7.0-fpm.sock;

Using the opchache function, yeah. I’ve also installed everything for performance in the Linux installation guide

oh my god ~ I met this issue yet !

hi Julie112 , I used centos 7.2 and deployment apache mariadb and php7.0 。Are you the same config wiht me ?

512 MB RAM is really not much. You probably need to optimize all the settings of your webserver, database-server and you will still hit some system limitations.

512 mb ram is indeed very little, that is probably a bottleneck. If you had more I’d also recommend running Redis :wink:

I’m facing the same issues here… I have nextcloud running on a 4 core 4GB VPS inside a host that runs an ADM 1950X threadripper… The drives is 2xM.2 in RAID0, I’m uploading over 1GB local network (though for internet we have 2x200mbit, just in case that would be it) so speed should not be the issue…

Yet, when I upload 700MB, after 5 minutes only 40MB has passed, and half of it just plainly fails…

I have about 100GB of files to upload so right now I’m slightly nervous… :grimacing:

I do see the following error upon uploading, but upload always continues anyway after this…

core.js?v=fceaa74d-8:2 Uncaught Error: cannot call methods on ocdialog prior to initialization; attempted to call method ‘destroy’
at Function.error (core.js?v=fceaa74d-8:2)
at HTMLDivElement. (core.js?v=fceaa74d-8:13)
at Function.each (core.js?v=fceaa74d-8:2)
at a.fn.init.each (core.js?v=fceaa74d-8:2)
at a.fn.init.e.fn.(/index.php/apps/files/anonymous function) [as ocdialog] (
at HTMLDivElement.close (merged-template-prepend.js?v=fceaa74d-8:929)
at e.(/index.php/apps/files/anonymous function).(anonymous function)._trigger (
at merged-template-prepend.js?v=fceaa74d-8:214

Server runs PHP7.0 (yes yes, will upgrade to 7.3 soon), uses APCU, and memcached, and I’ve setup redis for a nextcloud plugin, but I did not find something yet about setting up redis for nextcloud itself…

Client is chome Version 67.0.3396.87 (Official Build) (64-bit)

Does anybody have an idea what could be the cause of this and how I can speed it up?

I have same issues here:

CentOS 7.5/PHP 7.2.7/Redis/Opcache/Apache

Upload file speed only 40~50Mbps in local network (1GbE)
same speed via both Chrome browser and Win10 WebDAV
Regardless of file size, from 1MB to 5GB has same problem.

Server side has no performance bottleneck:
RAM used: 1.1GB/4GB Total
CPU Utilization: 3% only (4 core with E5-2678v3 CPU)

Storage (Attached with 10GbE backend):
External S3 on LAN (RGW from Ceph)
External NFS on LAN (from QNAP NAS)

The upload speed was normal when I just installed it. We added many apps, upload about 20GB data for month, and we meet the slow upload situation suddenly.

Is there any procedure to investigate the slow issue?

(Download file has no problem running at 400~500Mbps)

---- update:
I have try the following test:

  1. change local cache from redis to APCu
  2. add ‘php_value output_buffering=off’ to .user.ini

Both of above will improve the speed to very high at start of uploading, but only persist for few seconds, after that fall back to slow speed.

I am going to close this topic, all the configurations are too different and the individual answer will be different as well. If you need help, please open a new topic with your configuration. In that case it is interesting to know, when you experience your slow upload, what does your system do:

  • RAM is completely used (free or top)?
  • the i/o operations are limited (iowait in top or iotop)
  • CPU spikes for a specific process (e.g. php, database, …)
  • check slow queries for your database
  • also specify “slow” and compare to a direct upload via ftp, sftp, …