Back

Bad gateway when trying to view file

  • 0
  • Storage
BloodThermic
27 Nov, 2023, 01:07

When trying to open a video I have uploaded to appwrite it get a 502 bad gateway error. The file is an MP4,

http://91.109.116.47/v1/storage/buckets/6556a22a6cacc38a9e41/files/655a89ff29bcd6a0de82/view?project=6556a1c87ce9d637a15b&mode=admi

TL;DR
User is experiencing a "502 bad gateway" error when trying to open a video that was uploaded to Appwrite. The file is an MP4 and it seems to be related to compression and file size issues. The user was able to resolve the problem by compressing the video file before uploading it, but they are concerned about potential issues with larger videos in the future. The memory size issue mentioned in the logs was resolved by fixing permissions. No specific solution is provided in the thread for the bad gateway error.
Drake
27 Nov, 2023, 01:25

What's the response body? Anythjng in the Appwrite container logs?

BloodThermic
27 Nov, 2023, 01:47

Ahh I got it thank you! I just looked at logs. I did not know how till you told me to look it up.

BloodThermic
27 Nov, 2023, 01:47

The problem was no perms

BloodThermic
27 Nov, 2023, 01:50

I got this error in logs now Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 448676210 bytes) in /usr/src/code/vendor/utopia-php/storage/src/Storage/Compression/Algorithms/GZIP.php on line 41 [2023-11-27 01:49:45 *1723.5] ERROR php_swoole_server_rshutdown() (ERRNO 503): Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 448676210 bytes) in /usr/src/code/vendor/utopia-php/storage/src/Storage/Compression/Algorithms/GZIP.php on line 41

BloodThermic
27 Nov, 2023, 02:28

I have increased the file limit size in the .env and it uploaded fine but cant view

Drake
27 Nov, 2023, 04:13

Hmmm interesting...you have compression enabled on the bucket?

BloodThermic
27 Nov, 2023, 04:40

yes I do

BloodThermic
27 Nov, 2023, 04:40

GZip

BloodThermic
27 Nov, 2023, 04:41

I compressed the file and got it to work but that might be a problem in the future

BloodThermic
27 Nov, 2023, 04:53

@Steven

Drake
27 Nov, 2023, 15:16

What do you mean?

BloodThermic
27 Nov, 2023, 19:50

I compressed the video file before uploading it and it worked but if I upload a larger video later it might become a problem

Drake
27 Nov, 2023, 20:11

I meant in Appwrite, did you enable gzip on the bucket settings?

BloodThermic
27 Nov, 2023, 20:11

I do have it enabled

Drake
27 Nov, 2023, 21:08

how big is the file?

BloodThermic
27 Nov, 2023, 22:01

it was like 400mb

Drake
27 Nov, 2023, 22:11

i think we have a problem with these endpoints...can you create a github issue?

BloodThermic
27 Nov, 2023, 23:14

I can do you just want me to use the logs for the issue?

BloodThermic
27 Nov, 2023, 23:19
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