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
- Documentation That's Not Useful
Collections show me this link to explain what the activity tab is for. https://appwrite.io/docs/products/databases/databases the documentation honestly is not h...
- Hi, I'm getting this error while deployi...
✗ Error • search (6937cb70002c2e9c1a97) • Fai ✗ Error: Deployment of search has failed. Check at https://cloud.appwrite.io/console/project-693...
- Console cloud is down
As attached I can not login to console and it affected to our services that uses Appwrite <#1102936099745177700> <#564160731327758347>