Back

My functions start failing out of nowhere

  • 0
  • Self Hosted
ianmont
29 Nov, 2023, 17:00

I started getting this error quite often and it is affecting my platform a lot, it says "Operation timed out after 30001 milliseconds with 0 bytes received with status code 0\nError Code: 0"

What is happening?

TL;DR
The user is experiencing a problem where their functions are failing. They suspect it may be due to the function that decrypts the payload taking longer than expected. Some suggest avoiding the use of 'then' as it may cause unexpected behavior with promises. It is mentioned that executing another appwrite function within the function may be causing the issue. The user then asks for help on how to view container logs in Docker. The user is self-hosted on a digitalocean droplet and is receiving an error stating "Operation timed out after 30001 milliseconds with 0 bytes received with status code 0". Solution: The specific cause of
Kenny
29 Nov, 2023, 17:03

Are you cloud or self hosted?

ianmont
29 Nov, 2023, 17:03

Im self hosted on a digitalocean droplet

Kenny
29 Nov, 2023, 17:04

What version? Are you getting any errors in the container?

ianmont
29 Nov, 2023, 17:07

My appwrite version is 1.4.7 and let me check my container to see if there are any errors

Do you by any chance remember the commands I have to do in the console to see the container logs? I'm somewhat new to Docker

Kenny
29 Nov, 2023, 17:09

docker compose logs appwrite

ianmont
29 Nov, 2023, 17:14
Drake
29 Nov, 2023, 17:37

are you executing a function from your function?

ianmont
29 Nov, 2023, 17:54

I am not executing another appwrite function within my function, but I am fetching a document from a collection

It started happening with some last changes I made to the function:

The first is that it decrypts the payload that I sent to the function using a library called crypto-js

And the second thing I added is that would get an appwrite document and then after having the response from the appwrite document, I fetch an API and finally return the res.json

After those 2 changes the problem started to happen, I hope this information is useful to find out what the problem is

Drake
29 Nov, 2023, 18:19

so you're function is probably taking longer than 30s to execute synchronously, which is no longer allowed

Drake
29 Nov, 2023, 18:19

i highly suggest avoiding using then. There could be some unexpected behavior with how the promises are handled

ianmont
29 Nov, 2023, 18:22

Oh okay I'll change that

ianmont
29 Nov, 2023, 18:23

It could be because of the function that decrypts the payload... maybe it takes longer than expected, I'll see how I can fix it

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