Skip to content
Back

[CLOSED] `HTTP/2 send again with decreased length` while file create in DO Spaces

  • 0
  • Self Hosted
ftp27
24 Oct, 2023, 11:04

I'm trying to create a function that generates a file and uploads it to storage. However, the file creation process is failing with an error (appwrite contaner log):

TypeScript
[Error] Timestamp: 2023-10-24T10:57:59+00:00
[Error] Method: POST
[Error] URL: /v1/storage/buckets/:bucketId/files
[Error] Type: Exception
[Error] Message: HTTP/2 send again with decreased length
[Error] File: /usr/src/code/vendor/utopia-php/storage/src/Storage/Device/S3.php
[Error] Line: 847

It appears that not all file creation operations trigger the error. Recently, I made a copy of the server, downloaded files from the old storage, and uploaded them to the new storage. I encountered this error for only one file, and I simply skipped it. All other files were uploaded without any problems.

TL;DR
The user is experiencing an error (`HTTP/2 send again with decreased length`) while trying to create and upload a file to a storage service (DO Spaces) using a Python function. They provide a code snippet that reproduces the error. It seems that the function usually works fine, so the problem might lie with the file itself. The user mentions that they encountered the error for one specific file during a file transfer process, but all other files were uploaded successfully. The thread has been closed since the issue seems to have been resolved. No solution is provided in the thread.
ftp27
24 Oct, 2023, 11:09

If you interested here is part of python function that reproduce the error:

TypeScript
def make_sample(storage, context, video_id, input_file_name):
  sample_id = video_id + "_scaled"
  output_file_name = sample_id + ".mp4"
  
  context.log("Scale video to " + sample_id)
  os.system("ffmpeg -y -i " + input_file_name + " -ss 2 -crf 28 -vf scale=216:386 -an " + output_file_name)
  context.log("Upload scaled video id " + sample_id)
  storage.create_file(storage_id, sample_id, InputFile.from_path(output_file_name))
  context.log("Remove scaled video id " + sample_id)
  os.remove(output_file_name)
  return sample_id

I use the static_ffmpeg Python package for it. Usually, the function works fine, so it should be a file. Encryption and antivirus are turned off.

ftp27
24 Oct, 2023, 11:11

This file

ftp27
24 Oct, 2023, 20:10

I triggered the function a couple of times and it fixed itself. Maybe problem somewhere else..

Drake
24 Oct, 2023, 21:08

Can this be closed since it's working now?

ftp27
24 Oct, 2023, 21:09

Yep

Drake
24 Oct, 2023, 21:09

[CLOSED] HTTP/2 send again with decreased length while file create in DO Spaces

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more