When uploading a file 150 MB i am getting a 502 error
Last active 2 days ago
37 replies
0 views
- AR
It seems to be related to the file size. Is there a way to increase the max upload size file?
- DA
you need to set the bucket metadata appropiately to allow for larger files
- DA
there is a column to configure the max file size
- AR
I configure the file the max value available
- AR
but i can not upload a 150Mb file
- DA
and are you sure you are using that bucket when uploading the file? what do the logs say?
- AR
i only have one bucket
- AR
The logs not seems to show any important info
- AR
using the all service filter it seems that all the response are 200
- DA
you need to check storage logs, which I don’t see there
- AR
Are not these the storage logs?
- DA
these are but I don't see any attempt to upload a file, just a CORS pre-flight check (OPTIONS)
- AR
maybe this can help?
- AR
2023-03-13 09:02:14
hasura
{"detail":{"httpinfo":{"contentencoding":null,"httpversion":"HTTP/1.1","ip":"10.119.3.249","method":"POST","status":400,"url":"/v1/metadata"},"operation":{"error":{"code":"already-exists","error":"field with name \"bucket\" already exists in table \"storage.files\"","path":"$.args"},"requestid":"4dbe6b19-4354-4d53-adf5-c54dc1ffe785","requestmode":"error","responsesize":120,"uncompressedresponsesize":120,"uservars":{"x-hasura-role":"admin"}},"requestid":"4dbe6b19-4354-4d53-adf5-c54dc1ffe785"},"level":"error","timestamp":"2023-03-13T15:02:13.018+0000","type":"http-log"}
2023-03-13 09:02:14
hasura
{"detail":{"httpinfo":{"contentencoding":null,"httpversion":"HTTP/1.1","ip":"10.119.3.249","method":"POST","status":400,"url":"/v1/metadata"},"operation":{"error":{"code":"already-tracked","error":"view/table already tracked: \"storage.files\"","path":"$.args"},"requestid":"50c849d4-1ac4-48c2-b798-a99f35661e1c","requestmode":"error","responsesize":98,"uncompressedresponsesize":98,"uservars":{"x-hasura-role":"admin"}},"requestid":"50c849d4-1ac4-48c2-b798-a99f35661e1c"},"level":"error","timestamp":"2023-03-13T15:02:13.018+0000","type":"http-log"}
2023-03-13 09:02:14
hasura
{"detail":{"httpinfo":{"contentencoding":null,"httpversion":"HTTP/1.1","ip":"10.119.3.249","method":"POST","status":400,"url":"/v1/metadata"},"operation":{"error":{"code":"already-exists","error":"field with name \"files\" already exists in table \"storage.buckets\"","path":"$.args"},"requestid":"0c7730b7-956c-467e-931a-4a2da9fd3aa8","requestmode":"error","responsesize":121,"uncompressedresponsesize":121,"uservars":{"x-hasura-role":"admin"}},"requestid":"0c7730b7-956c-467e-931a-4a2da9fd3aa8"},"level":"error","timestamp":"2023-03-13T15:02:13.018+0000","type":"http-log"}
- AR
{"detail":{"httpinfo":{"contentencoding":null,"httpversion":"HTTP/1.1","ip":"10.119.3.249","method":"POST","status":400,"url":"/v1/metadata"},"operation":{"error":{"code":"already-tracked","error":"view/table already tracked: \"storage.buckets\"","path":"$.args"},"requestid":"54b7d9cf-8b29-4be8-a402-a095da5bf5e5","requestmode":"error","responsesize":100,"uncompressedresponsesize":100,"uservars":{"x-hasura-role":"admin"}},"requestid":"54b7d9cf-8b29-4be8-a402-a095da5bf5e5"},"level":"error","timestamp":"2023-03-13T15:02:13.018+0000","type":"http-log"}
- DA
those belong to hasura, not hasura-storage, you can filter logs by service
- AR
all the info i got for the Storage log was this
- AR
- AR
seems there is not errors
- DA
do you have a subdomain?
- AR
spywqnpdiamjiffveupo
- DA
looking at the logs of your application I don't see any errors in the last 7 days. I see lots of POST, GET and OPTIONS requests but they all succeeded. Can you try to reproduce with postman and show me the request and the response?
- AR
Request URL: https://spywqnpdiamjiffveupo.storage.us-east-1.nhost.run/v1/files
Request Method: POST
Status Code: 502
Remote Address: 151.101.217.91:443
Referrer Policy: strict-origin-when-cross-origin
accept-ranges: bytes
access-control-allow-origin: https://splendorous-gnome-82c3dc.netlify.app
access-control-expose-headers: Content-Length,Content-Type,Cache-Control,Etag,Last-Modified,X-Error
content-length: 552
content-type: text/html
date: Wed, 15 Mar 2023 13:49:49 GMT
via: 1.1 varnish, 1.1 varnish
x-cache: MISS, MISS
x-cache-hits: 0, 0
x-served-by: cache-iad-kjyo7100047-IAD, cache-eze2230040-EZE
x-timer: S1678888177.957371,VS0,VE12551
:authority: spywqnpdiamjiffveupo.storage.us-east-1.nhost.run
:method: POST
:path: /v1/files
:scheme: https
accept: application/json, text/plain, /
accept-encoding: gzip, deflate, br
accept-language: en,es-419;q=0.9,es;q=0.8,en-US;q=0.7
authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJodHRwczovL2hhc3VyYS5pby9qd3QvY2xhaW1zIjp7IngtaGFzdXJhLWFsbG93ZWQtcm9sZXMiOlsidXNlciIsIm1lIl0sIngtaGFzdXJhLWRlZmF1bHQtcm9sZSI6InVzZXIiLCJ4LWhhc3VyYS11c2VyLWlkIjoiNjYyZmEwMDEtYzU0Ny00NWNlLWJlOWQtNTA1ODRiZWNkMDc3IiwieC1oYXN1cmEtdXNlci1pcy1hbm9ueW1vdXMiOiJmYWxzZSJ9LCJzdWIiOiI2NjJmYTAwMS1jNTQ3LTQ1Y2UtYmU5ZC01MDU4NGJlY2QwNzciLCJpYXQiOjE2Nzg4ODgxNjcsImV4cCI6MTY3ODg4OTA2NywiaXNzIjoiaGFzdXJhLWF1dGgifQ.i0iFQLNmSW5WSyzdTVwEPWKXqOwr849E45HJJCCPQ
content-length: 159559541
content-type: multipart/form-data; boundary=----WebKitFormBoundaryTekO1vPGFQlpr705
origin: https://splendorous-gnome-82c3dc.netlify.app
referer: https://splendorous-gnome-82c3dc.netlify.app/
sec-ch-ua: "Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: cross-site
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
x-nhost-file-name: Cesar Moreno 123.mp4 - AR
- AR
- AR
- DA
that request I can see in the logs and you should be able to see it too if you filter by service. Basically that request isn't correct. You need to upload a multipart form and put your file in the
file[]
field - AR
- AR
- AR
@david.barroso any idea now to solve this?
- DA
no, it is very hard to read those screenshots. In any case, I just tested myself with a brand new app and it worked fine
- DA
- AR
https://www.loom.com/i/cbc1872fdb774eceb55671ca73572809
- AR
https://www.loom.com/i/ff37affb2259409ba362a1627ebb1067
- AR
sorry about the bad resolution, it seems that discord reduce the image quality
- AR
hi @david.barroso , this is a video about how to upload a file in the nhost admin seems to fail
https://www.loom.com/share/8a8b86aaee9445cd9d0a801872c81fac - DA
would you mind giving me access to your workspace so I can check first hand? if so DM me and I will give you my email so you can invite me
Last active 2 days ago
37 replies
0 views