Cloud Functions timeout, even though I've set the timeout settings to 900.
- 0
- Functions
- REST API
- Cloud
Hi,
I have a cloud function in the Appwrite cloud project. I noticed that my users receive an error response when their requests exceed 30 seconds.
However, I created a dummy cloud function to investigate with simple code that waits 40 seconds and returns dummy text. It returns an error after 30 seconds, even though I've set the timeout value to 900 seconds.
The dummy function:
Future<dynamic> main(final context) async {
await Future.delayed(Duration(seconds: 40));
return context.res.send('Hello, World!');
}
The error that I received in response:
Error 400
Internal error: Operation timed out after 30001 milliseconds with 0 bytes received
Type
general_argument_invalid
I'm calling the function using a RESTful API, and I'm using the cloud version of Appwrite. Also, I've set the timeout to 900 in the function's settings.
Just to verify, in Functions -> function -> settings -> timeout it says 900? I manually deploy most my functions and if you haven't updated the appwrite.json file when deploying it sets the timeout value back to the default.
Synchronous executions have a hard timeout of 30s
Are there any solutions to ensure that the function completes its execution within the timeout period?
Yes, I'm updating the timeout to 900 in the function settings whenever I make a new deployment
for slower functions, you should be executing them asynchronously
@VincentGe have we documented this yet?
Is this cloud specific? First time hearing about this
nope, not cloud specific
Recommended threads
- Got message for auto payment of 15usd fo...
how did this happen? 1. i claimed my 50usd credits via jsm hackathon - https://hackathon.jsmastery.pro/ 2. it asked me which org. to apply the credits on, i se...
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...