Back

Rapidly creating function execution causes Appwrite to crash entirely

  • 0
  • Self Hosted
  • Functions
elnur
17 Apr, 2024, 11:21

This is alarming. Creating executions by holding down "Enter" key will continually create executions. Whereby the first 5 or so goes through but then Appwrite freezes entirely and nothing works.

It does resolve itself after 5 minutes, but in that time nothing works. The console is unavailable as are the SDKs.

It actually doesnt resolve itself. It freezes after executing a function again.

TL;DR
Developers reported that rapidly creating function executions caused Appwrite to crash entirely. They found that setting the async option to false seemed to trigger issues when trying to await the result. Also, errors like "Operation timed out" were encountered. To debug this, developers can analyze the error logs and consider optimizing the code for improved performance. Additionally, creating a large number of executions in rapid succession could lead to Appwrite freezing entirely, rendering the console and SDKs inaccessible. This freezing issue does not resolve itself automatically and persists even after a few executions.
elnur
17 Apr, 2024, 11:24

This input, will send executions to the functions.createExecution SDK.

elnur
17 Apr, 2024, 11:24

Then after creating the execution I get this:

elnur
17 Apr, 2024, 11:31

Any way I can debug this for you guys?

elnur
17 Apr, 2024, 11:31

Also sometimes I get this:

Operation timed out after 30002 milliseconds with 0 bytes received with status code 0\nError Code: 0

elnur
17 Apr, 2024, 11:37

Perhaps because the async option was set to false?

but then how can one await the result?

elnur
17 Apr, 2024, 11:38

Previous code:

TypeScript
const result = await functions.createExecution(
 "functionId", // Function ID
 JSON.stringify(executionData)
);
elnur
17 Apr, 2024, 11:38

New code but dont know how to await the result?:

TypeScript
const result = await functions.createExecution(
 "functionId", // Function ID
 JSON.stringify(executionData),
 true
);
elnur
17 Apr, 2024, 11:40

So yeah... it needs to by synchronous.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more