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
- My account is blocked so please check an...
My account is blocked so please unblock my account because all the apps are closed due to which it is causing a lot of problems
- Applying free credits on Github Student ...
So this post is kind of related to my old post where i was charged 15usd by mistake. This happens when you are trying to apply free credits you got from somewh...
- Attributes Confusion
```import 'package:appwrite/models.dart'; class OrdersModel { String id, email, name, phone, status, user_id, address; int discount, total, created_at; L...