
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
- fix project error
https://cloud.appwrite.io/console/project-nyc-6610481f003bf0704275 Hi, could someone help with this issue: error: Invalid Argument Project with the requested I...
- Flutter - FCM: App Crashes when receivin...
- Request: When Will Appwrite Sites Waitli...
Hey team! 👋 I recently joined the waitlist for Appwrite Sites on Cloud and got the confirmation email that says: "You've successfully joined the Sites waitli...
