Back

Async Function Execution Response Body Empty

  • 0
  • Flutter
Infinil
15 Sep, 2023, 07:17

my dart code for it

TL;DR
Users have been discussing why the response body is empty for async function execution. It seems that the 1MB limit is only for async functions. The response body field will still exist for synchronous functions. Some users are using the `xasync: false` approach as a temporary solution, but it might require more resources. There is confusion about the duration and execution time of async functions. Other function executions might affect the current async function if they are all async and executed in a queue. The function code is the same, so it's unclear why it takes up to 10 seconds to execute. One user shared the GitHub issue for further reference
Infinil
15 Sep, 2023, 13:48

[CLOSED] Async Function Execution Response Body Empty

Infinil
15 Sep, 2023, 15:25

Async Function Execution Response Body Empty

Infinil
15 Sep, 2023, 15:26

re opened because earlier i didnt realize that it started working on xasync: false

Drake
15 Sep, 2023, 17:32

how long do these take that you need to poll for the data?

Infinil
15 Sep, 2023, 17:33

you mean the execution time on avg?

Infinil
15 Sep, 2023, 17:35

it varies like it can even take upto 10s

Infinil
15 Sep, 2023, 17:35

or just 100ms

Drake
15 Sep, 2023, 17:35

do you know why it takes up to 10s?

Infinil
15 Sep, 2023, 17:37

no clue the function code is same 🤔

Infinil
15 Sep, 2023, 17:37

but 10s is rare

Infinil
15 Sep, 2023, 17:37

maybe other async function executions were processing at the same time

Infinil
15 Sep, 2023, 17:38

since its async first in first out

Infinil
15 Sep, 2023, 17:39

one question do other function executions have any affect on lets say this function (considering they all are async)?

Drake
15 Sep, 2023, 17:39

all async functions execute in a queue

Drake
15 Sep, 2023, 17:40

i thought this time was actually exeuction time...and not waiting time..

Drake
15 Sep, 2023, 17:40

so why can't you remove the xasync: true?

Infinil
15 Sep, 2023, 17:40

oh i mean it just says duration so i thought it might be the addition of both?-

Infinil
15 Sep, 2023, 17:41

i can but wouldnt that take more resources

Infinil
15 Sep, 2023, 17:41

like if multiple ppl execute it parallelly

Infinil
15 Sep, 2023, 17:42

either way i am going with xasync: false approach for now cuz it works

Drake
15 Sep, 2023, 17:49

sort of but that shouldn't be a concern

Infinil
15 Sep, 2023, 17:52

oh gotcha btw response body field is staying for synchronous functions right?

Infinil
15 Sep, 2023, 17:52

in issue u mentioned it was removed because of 1MB limit i am guessing thats only for async ones?

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