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
- Is Quick Start for function creation wor...
I am trying to create a Node.js function using the Quick Start feature. It fails and tells me that it could not locate the package.json file. Isn't Quick Start ...
- Connecting server functions to GitHub re...
The project I am working in has recently moved organizations on Appwrite. The same is true for the repo on GitHub, which as moved from a private user to a organ...
- Missing C++ libstdc library in Python fu...
I have a function running Python 3.12 which suddenly started dumping errors (as of today; it worked yesterday). I hadn't changed any code so I found this odd, b...
