Operation timed out after 900001 milliseconds with 0 bytes received with status code 0
- 0
- Functions
Hi !
I try to upload my nodeJS function to appwrite. The total bundle size is 130MB, it's due too big jsons files stored alng side to my index.js.
Appwrite stucks on the "building" phase and get this error 20 minutes later: Operation timed out after 900001 milliseconds with 0 bytes received with status code 0
.
I tried to upload my function with only one json and it works perfectly because the bundle is smaller than the previous. But I need to have all my Jsons files to execute the function, do you have an idea how to resolve the issue ? I don't know why Appwrite need so much time to building the project with only one JS file and big JSON files, there is nothing to compile ? no ?
Thank you so much for your help !
What is the value of _APP_FUNCTIONS_SIZE_LIMIT
in your .env
file?
https://appwrite.io/docs/environment-variables#functions
why do you need the JSON files in the function code?
Hi !
Thank you for your answer !
Yes I already edited the variable: _APP_FUNCTIONS_SIZE_LIMIT=1200000000
. It's enough for my needs.
Hi ! Thank you for your message ! It's just data, about GPS coords
Data are not directly available through an API so I have to download my self on my folder project.
But now I uploaded the files on Appwrite Storage and try to fetch the files when I need it.
Quick workaround would be to host it in your Appwrite inside a storage bucket, Then anytime the function is cold-booted you'll fetch the files.
Exactly
That would work perfect if your function have a long threshold
Yes, thank you ! I hop too π I will try this and I will keep you informed
Ok it works perfectly π but is slower
Slower the loading process or in general?
The time between sending the request and receiving the data
almost 3s
You can first try this.
Run the function
And in your server run docker stats
to see if there's any CPU / Memory spikes
I think the wait is coming from the file. It's a big file 50m and clould have some delays before it downloaded completely no ?
Yes, but after that you're loading the file into the memory?
It's a big file though maybe in this case it will be better to try with a different runtime for better performance
with docker stats everything is ok just when in triggered the function
Yes maybe, or find a way to have my files along with the index.js ?
I think building time is long because Appwrite try to replace global variable into my files.
I don't think this would made your function slower. Because after cold booting the function then it's like you've upload the files with the function.
It's true that each cold boot would be a bit longer because the function will have to fetch files.
I don't think this would made your function slower.
Yes I think too but for the moment is not working at all, I get timeout error.
Anyway thanks for your help<:appwriteheart2:1073243188954935387> , I hope there will be a fix later!
Recommended threads
- Need help with createExecution function
Hi, Need some help understanding createExecution. When requesting function execution via createExecution, the function handler arguments are incorrect and rese...
- HTTP POST to function returning "No Appw...
Hi everyone, Iβm running into an issue with my self-hosted Appwrite instance. Iβve set up my environment variables (APPWRITE_FUNCTION_PROJECT_ID, APPWRITE_FUNC...
- Can't add dart 3.5 runtime
Modified the `.env` to enable dart 3.5 runtime on my self-hosted instance but still can't find the runtime when creating a new function. I manually pulled the i...