What determines the function execution duration? Appwrite 1.4.2 is a self-hosted Runtime: Dart (dart-3.0) The first execution is 2-3 seconds. Two series of 3 executions. Is the problem in bad hardware, or should it be?
What is your function threshold timeout? The first one should take a bit more as it starting up the server.
function threshold timeout - default 15 sec.
Than if it was on the exact hour time, then it might be shut down
Can you check the results of
docker ps -a
To see how long the function container is running?
"worker-functions" 26 hours ago Up 26 hours 80/tcp
It should be something with the function ID as is name
You mean timeout or threshold?
You set the threshold in the .env file
60
So that's is 60 seconds
Meaning if your function is inactive for 60 seconds it will get shut down and will have a cold boot (which is 2-3 seconds) in your case before starting.
Change that number to 3600 for example to make it shut down any inactive function after one hour. Remember to reload your docker
docker compose down && docker compose up -d
And let us know if you still experience the long 2-3 seconds execution time.
Yes
That make sense As you can see is brand new (just 8 seconds) and that is because it was shut down after 15 seconds of being inactive
thank you i understand can be closed👍
btw, there's a bug that will be fixed in 1.4.3 where the runtime containers were being removed way too soon. see https://github.com/appwrite/appwrite/pull/6235
In my case, changing the threshold timeout helped.
[SOLVED] Function execution duration
Recommended threads
- The file size is either not valid or exc...
Hello, I am receiving the following error when I am trying to deploy a function from my local. ``` > appwrite push functions --function-id xxxxxxxxx ℹ Info: Va...
- How does sending email from the Appwrite...
I noticed that the pricing page mentions “Messages – 1000 per month” for the Free plan. Is this different from sending emails? When I try to send an email usin...
- Appwrite functions dart runtime (3.7 sup...
It seems that currently Appwrite functions only support Dart runtime to 3.5, for my code I need dart 3.7. Is there any plan to support Dart3.7 runtime soon. Is ...