Cannot upload large files - internal Server error 500

hello,

everytime i try to upload a large file (1,5GB) with my iphone via wifi (the speed is not so fast so this may takes 5 minutes) i got the “internal Server error 500”.

first i thought i have to increase php memory but this does not change enything. after that i added NEXTCLOUD_UPLOAD_LIMIT and NEXTCLOUD_MAX_TIME but this does not fix the problem.

when the upload fails i dont get a log in administrator settings :confused:

im running Nextcloud AIO v7.0.0 behind a nginx proxy manager.
i set up the nginx with the given documentation and set the following variables:

client_body_buffer_size 512k;
proxy_read_timeout 86400s;
client_max_body_size 0;

im using this docker compose file:

version: '3.3'
services:
  nextcloud:
    image: nextcloud/all-in-one:latest
    restart: always
    container_name: nextcloud-aio-mastercontainer # This line is not allowed to be changed as otherwise AIO will not work correctly
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config # This line is not allowed to be changed as otherwise the built-in backup solution will not work
      - /var/run/docker.sock:/var/run/docker.sock:ro # May be changed on macOS, Windows or docker rootless. See the applicable documentation. If adjusting, don't forget to also set 'WATCHTOWER_DOCKER_SOCKET_PATH'!
    ports:
      - 80:80 # Can be removed when running behind a web server or reverse proxy (like Apache, Nginx, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
      - 8080:8080
      - 8443:8443 # Can be removed when running behind a web server or reverse proxy (like Apache, Nginx, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
    environment: # Is needed when using any of the options below
      - APACHE_PORT=11000 # Is needed when running behind a web server or reverse proxy (like Apache, Nginx, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
      - APACHE_IP_BINDING=0.0.0.0 # Should be set when running behind a web server or reverse proxy (like Apache, Nginx, Cloudflare Tunnel and else) that is running on the same host. See https://github.com/nextcloud/all-in-one/blo>
      - NEXTCLOUD_DATADIR=/mnt/ncdata # Allows to set the host directory for Nextcloud's datadir.  ^z   ^o ^z   ^o ^z   ^o Warning: do not set or adjust this value after the initial Nextcloud installation is done! See https://gi>
      - NEXTCLOUD_UPLOAD_LIMIT=10G # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud
      - NEXTCLOUD_MAX_TIME=7200 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud
      - NEXTCLOUD_MEMORY_LIMIT=2048M # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud

volumes:
  nextcloud_aio_mastercontainer:
    name: nextcloud_aio_mastercontainer # This line is not allowed to be changed as otherwise the built-in backup solution will not work

my nextcloud is hosted by myself and i dont use cloudflare.
anyone have an idea what i could try next?

Hi, can you try to upgrade to v7.2.0 Beta and check if this fixes it? See GitHub - nextcloud/all-in-one: Nextcloud AIO stands for Nextcloud All-in-One and provides easy deployment and maintenance with most features included in this one Nextcloud instance.

@szaimen
thanks for this idea :slight_smile: . I tested the beta version and got the same error after afew minutes.
it seems like the upload lasts a bit longer this time but then still aborts with the same error.

Do you have any other idea i could try. Or can i check some logs (where?) for a hint?

How much data is successfully uploaded usually when it fails and after what time?

I am definitely not sure if this is tied to an exact time.
i upload the files via wifi with an iphone.
i did some testes with a file size of 1.52 GB.

Nextcloud-Beta:
test 1-4 via WIFI over internet:

  1. uploadtime: 6:30min; uploadsize: 1.21GB
  2. uploadtime: 5:41min; uploadsize: 1.21GB
  3. uploadtime: 6:35min; uploadsize: 1.21GB
  4. uploadtime: 9:12min; uploadsize: 1.21GB (iphone was locked a few seconds)

Nextcloud-latest:
Test via WIFI in the same netzwork of Nextcloud Server
im not 100 sure:

  1. uploadtime: 3min; uploadsize: 500~600MB

i’m definitely not sure if this is tied to an exact time/memory size. Whether anything has really changed with the beta I can test again in about an hour. From the feel of it, I would say that the upload lasts longer (about twice as long).
the time seems to vary. The file size seems to stop very consistently at 1.21GB.

Do bigger uploads work from different devices e.g. in the web interface or do you run into the same issues there?

this is a really good question :slight_smile:. the most files i normaly uploaded via Windows Clients. I dont have much large files but i found one 2.8GB which i had successfully uploaded a few weeks ago. i know i had some trubble with my computer as well with the windwos client but i will check that this evening with different devices and nextcloud clients.

i did some tests and i only have this issu with my iphone. im not sure what happend when i try upload a large file with an android phone. i will try that in a few days.

when i upload the files with the computer via windows client or browser everything is fine.

i also uninstalled the app on my iphone but this does not change anything. i get the “internel server error 500” after 1.21GB are uploaded.

feels like an ios upload issue

1 Like

Not sure if there is an update on this. But my server is freezing out after trying to upload on android Nextcloud AIO verison 7.4.1