#Functions seem broken

52 messages · Page 1 of 1 (latest)

steep urchin
#

I have a function that tries to add documents to a collection, first I wrote the function to check if the document exists by ID and if so, not add it. After the first run the async queue went sideways and all my other async function went on "waiting" for a few minutes, completely broke production. Then I did a "try catch" to write a document and if Doc ID exists it will catch but that also after first few runs sent rest of my async functions on "waiting". Just to be clear, working with Dart runtimes and the number of check can in the tens of thousands and fails can be as well but I would not expect the system to then take a 20 minute breather to recover.

Not sure why since none of the container logs point me to a direction as to why it happens but if you stress the function out with too much database checks and fails the whole thing goes on a waiting spree and everything async stops.

has anyone else faced this and has a work around ?

humble slate
steep urchin
humble slate
steep urchin
# humble slate Clear the queue? Go into redis and clear things How exactly are you executing t...

These are CRON functions that do the updates and some function are trigger based function that are supposed to spin up when, say a user registers. The annoyance is if my CRON function can cause my trigger function to not trigger cos now they are waiting for something it breaks things. I would really request someone to try this and try to figure out a root cause cos a failed aync function shouldnt cause the complete async function to queue to grind to a halt for a long time.

humble slate
steep urchin
#

Yup logs right now. I have no clue, and the PROD is now halted cos things dont trigger anymore ..

steep urchin
humble slate
steep urchin
# humble slate These logs indicate some function is processing

Then you need to tell how to check what is, cos I know nothing else is executing. Also, its not only that async function are severely delayed they are now delayed perpetually, so even when they finally trigger 10 minutes in, the next trigger again waits for something

humble slate
steep urchin
steep urchin
steep urchin
humble slate
steep urchin
humble slate
#

And how are you triggering the function?

steep urchin
steep urchin
steep urchin
humble slate
tranquil vapor
#

100k writes is a sh*t ton holy moly haha

steep urchin
steep urchin
humble slate
steep urchin
humble slate
steep urchin
humble slate
steep urchin
steep urchin
steep urchin
#

It happened right after a function that dumps / tries to dump a ton of data into the database failed due to timeout. The previous execution failed 15 minutes before I tried executing again and it went “waiting”

humble slate
#

I would have expected a "fetched 13 jobs" or something like that

steep urchin
humble slate
#

this should tell you if it's that function and that it's triggered by http. in that case, it would be this code being triggered.

#

and then maybe you can modify the source code to log some more info

steep urchin
misty harness
steep urchin
misty harness
#
docker ps
# copy the container ID of redis or you can use the name of it
docker exec -it <containerId> /bin/sh <-- # this puts you into the container, if redis then redis
#

then you use redis commands

#

because that container has the redis server

#

you might be able to just use the appwrite container as they are networked together and it's using redis