Back

Problem updating a document

  • 0
  • Databases
  • Cloud
Binyamin
15 Sep, 2023, 02:50

Or Preview

TL;DR
User is experiencing an error when updating a document. They are unsure if they need to add a delay to functions inside a response function. They also ask if Appwrite Cloud will be updated to newer versions. The response suggests trying a 5ms delay and increasing if necessary. It is mentioned that there is a bug with rate limits and a delay may be needed between update calls. The project ID is mentioned and the user asks if anyone is familiar with the error. They are advised to wait for a response from Steven. The error is likely due to database operations and may require approval from an Appwrite core member. Screenshots of headers,
Binyamin
15 Sep, 2023, 02:51

And also the rest of that part

ianmont
15 Sep, 2023, 02:51

Heres the response tab

ianmont
15 Sep, 2023, 02:52

heres the preview tab

Binyamin
15 Sep, 2023, 02:52

It's probably due to some database operations. But it will require <:appwrite:637383039499894787> core member approval

ianmont
15 Sep, 2023, 02:53

heres the rest of the headers tab

Binyamin
15 Sep, 2023, 02:53

So no problem from the rate limit one

Binyamin
15 Sep, 2023, 02:54

If it's happened randomly then it just make more sense that it has to something with DB operations as your code logic looks correct. Let's see what Steven would say

ianmont
15 Sep, 2023, 02:55

alright, thank you binyamin

ianmont
15 Sep, 2023, 02:55

I'll wait for Steven <:appwriterocket:823996226894692403>

ianmont
15 Sep, 2023, 19:35

Hello @Steven , sorry for tagging you, I want to know if you have knowledge of this error? :appwritecheers:

Drake
15 Sep, 2023, 20:01

what's our project id?

ianmont
15 Sep, 2023, 20:05

the project id 64da8ed68873cbb8ec7b its on appwrite cloud

ianmont
15 Sep, 2023, 20:05

version 1.1.2

Drake
15 Sep, 2023, 20:07

there's a bug with rate limits. can you put a slight delay between your 2 update calls?

ianmont
15 Sep, 2023, 20:10

Yes, like how many seconds would the delay be?

Also i have several functions that update documents at the same time, do I have to add the delay to everything?

Drake
15 Sep, 2023, 20:12

you can try 5 ms and then increase if you're still seeing the problem. yes, they'll all need a delay at the moment

ianmont
15 Sep, 2023, 20:13

alright, is this a cloud-only problem?

Drake
15 Sep, 2023, 20:13

ya i think we've fixed this in newer versions

ianmont
15 Sep, 2023, 21:00

Ok and a question, when will appwrite cloud be updated to new versions?

Drake
15 Sep, 2023, 21:01

Soon

ianmont
15 Sep, 2023, 21:03

alright thanks steven

ianmont
16 Sep, 2023, 02:02

Steven I have a question

What happens if I have functions like this

const function = databases.createDocument(database, collection, id, {})

function.then(function(response) { // here the rest of the code })

do i have to add delay to the one inside the function response?

or not that one because it doesn't start until the one above is fulfilled

ianmont
16 Sep, 2023, 02:04

For example, in this there are two separate functions, not inside the then() and it causes the error and that is why I have to put the delay, but if I put them one after the other inside a then(// here the other function). Works?

Drake
16 Sep, 2023, 03:09

No delay needed

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