Hm.. I didn't, but I did just started my computer from sleep
I am thinking a workaround for this is when the executions failed and return the error with string "A runtime with the same ID is already being created. Attempt a execution soon" then I'll retry the call
it's hacky, but I think it'll do 😂
That can work But you can try is to run
docker rm -f 6494dc2f01d8060d6659-64cefbc7d4186d803f0d
That will remove the function container Then reload the infrastructure by running
docker compose down && docker compose up -d
This may solve your problem
I restarted the docker, looks like from 7 call it survived 5. the spinner ones failed to call the function
and here's after I refreshed the page
Are all those rows are requests to the same function?
yes, each of those rows called the function
Okay, So this could happened due to the fact Appwrite's calls itself. You may want to check the semi-solution provided in this issue https://github.com/appwrite/appwrite/issues/5629
Although it's a bit weird because in my case (Tried to replicate it) it didn't even pass the other requests.
Oh right! That issue speaks what happened to me really well! I did call the function more than 3 times per second
The solutions looks so strange 😂
But it depends on the server strength, and yours (local) is pretty massive. Can you restart the docker Then run the page once to get the two infinity loaders, then run
docker logs appwrite
docker logs appwrite-executor
And share the results
here's the results:
What operation system you're using and how you've installed Docker
for my local environment I am using Windows 11 (specifically it's version 22H2, build 22622.290). I installed docker by Docker Desktop for Windows
Okay, I was able to recreate the error
It goes like this If you're executing the function for the cold boot ( as any function is being shutdown after defined time) then it won't be able to handle more the X number of parallel requests.
The solution would be
- Use the keep alive logic like I suggests here https://discord.com/channels/564160730845151244/1102936099745177700/1115665275191312524 and here https://discord.com/channels/564160730845151244/1102625724243906640/1102628184219979886
- Change your function execution code to
awaitso they will be executed one after another and not in parallel.
Oooh! Cool! so I can entered the cron job with */30 * * * * right? I'll definitely use it. I also already implemented the loop in my client side to recall the code maximum of 5 times everytime it returned failed status with 500ms delay, and it looks like kinda work. Not quite beautiful, but it works ❤️
Thank you @Binyamin !
<:appwritefire:823999000330895380>
Hi @igrir , if this is fixed, shall I close this?
I think it's somehow fixed. The one I made with looping client is not quite effective, but maybe the keep alive logic one will. Yes, you can close this, thanks @joeyouss !
that was quickkk, thanks!
[SOLVED] Function executions need warmup
Recommended threads
- Provider error when creating a function ...
- Failed to create function
Hey everyone 👋 I'm having an issue creating Functions on Appwrite Cloud and I'm not sure if it's a platform bug or something wrong in my project. When I try t...
- Function deployment failed: Unable to re...
Hi Appwrite team, I have been experiencing persistent errors when i attempt to push my appwrite functions. The logs on the deployment detail page on the console...