Requests time out when you upload or download files from volumes

If you are working with large files, you might encounter errors when you try to upload or download the files from storage volumes.

Symptoms

You get a message that your request cannot be completed because the request took too long.

Causes

This problem can be caused by a combination of the following factors:
  • Slow network speeds
  • Large files
  • Short timeout values

Resolving the problem

There are several ways that you can resolve this problem.

User response:

As a user, you have several options if your request times out when you upload files. If your request times out when you download files, contact your system administrator.

If a file upload fails, try one of the following options:
  • If you want to use the integrated file browser, compress large files (for example files that are 10 GB or larger) as ZIP files or TAR files before you upload them. You can optionally extract compressed files on upload.
  • Use the Volumes API to upload large files to a volume. The API is not constrained by the file size limits that are imposed by your web browser and is capable of uploading very large files, such as 75 GB files.

    You can also compress large files before you upload them.

Administrator response:

If users encounter issues when downloading files, or if users continue to have issues uploading files, you might need to adjust the following settings:
Load balancer timeout settings
You can increase the timeout client and timeout server settings to 10 minutes (600 seconds). For details, see Changing required node settings.
Volume TLS timeout settings
By default, the --tls-read-timeout and --tls-write-timeout parameters are set to 10m (10 minutes). on each storage volume that you create.
  • The --tls-read-timeout parameter specifies the amount of time an upload request can run before the request times out.
  • The --tls-write-timeout parameter specifies the amount of time an download request can run before the request times out.

You can increase length of time for these parameters on the volume:

  1. Get the name of the storage volume that you want to edit:
    oc get deployment | grep volumes
    The command returns output with the following format:
    volumes-new-volume-api-nfs-1-deploy     1/1     1            1           2d17h
    volumes-new-volume-api-smb-1-deploy     1/1     1            1           2d17h
    volumes-old-instance-api-nfs-2-deploy   1/1     1            1           2d20h
    volumes-old-instance-api-smb-4-deploy   1/1     1            1           2d17h
  2. Edit the appropriate volume:
    oc edit deployment <volume-name>
  3. Change the values for --tls-read-timeout or --tls-write-timeout:
    • If you want to increase the amount of time that an upload request can run, increase the value for --tls-read-timeout.

      Specify the timeout duration with the format Minutesm. For example, to set the timeout at 15 minutes, specify 15m.

    • If you want to increase the amount of time that a download request can run, increase the value for --tls-write-timeout.

      Specify the timeout duration with the format Minutesm. For example, to set the timeout at 15 minutes, specify 15m.

  4. Save your changes to the volume deployment.

    For example, if you are using vi, hit esc and enter :wq