A cloud function won't run. I'm waiting for 7 minutes already, and it is still "waiting". Re-running it doesn't help...
This could happen when you don't send any response, are you sure your code is responding something?
Is this on cloud or self-hosted?
Cloud.
and it's still waiting?
I couldn't reproduce it anymore though, must have been a temporary glitch. However it's the second time I encounter it.
we did have a high load at this time so that may have been the reason
No, I think at some point it did execute normally
async executions get queued and then they're processed in FIFO order.
I see... Will paid users get a priority queue or something? Wouldn't be nice if in production my app's api fails to respond at random times...
API? synchronous executions are executed isntantly
I mean, not the Appwrite API but functions-as-an-API scenario. Think e.g. an AI app that uses OpenAI to respond to the end user. The end user can't really call OpenAI directly since they need my secret key. Hence they will call my cloud function as a user-facing API.
Not sure if that's the original intent of the cloud functions, but that's the best way I found to implement the above app in a serverless setting.
if you have functions as an api, you'd be executing the function synchronously.
However, synchronous executions are limited to 30 seconds before they time out which OpenAI can take longer than that, so you'd have to execute that asynchronously.
nontheless, I'm not sure about priority queues. I've reached out to the team about it
nontheless, I'm not sure about priority queues. I've reached out to the team about it
Thanks for checking that for me!
However, synchronous executions are limited to 30 seconds before they time out which OpenAI can take longer than that, so you'd have to execute that asynchronously.
Still better than Vercel's limit of 10 seconds 🙂 but maybe there's a better way to implement the scenario I described? With everyone having those limits, it feels like I'm struggling against the cloud here.
if you have functions as an api, you'd be executing the function synchronously. I didn't know there's a difference between calling a function via REST API and calling it from the dashboard, that's helpful!
via REST API? Which exactly?
I mean doing a fetch to the function's domain, as displayed under the "Domains" tab at the function settings on the Appwrite dashboard.
Ah right. Ya that's considered a synchronous execution.
If you call the create execution API, there's an async param that you can set to true or false
Recommended threads
- Sudden CORS Errors - Domain hasn't Chang...
I have an Appwrite project with two web apps configured, the first one has the hostname `*` and the second one I just added to test if it could fix the issue wi...
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...
- Create a new paid tier
Current pricing seems reasonable enough about what is someone getting for 25$. But for some people most of these resouces are getting wasted. Like the bandwidt...