Back

Every function execution is failing

  • 0
  • Functions
  • Cloud
Drake
21 Oct, 2023, 15:57

And what about the build command?

TL;DR
Function execution is failing and no context logs are being logged. It is possible that there is an infinite loop in the code. The suggestion is to use max retries and increase the function timeout. It is also recommended to convert exceptions to strings before passing them to context.err(). Additionally, sharing the code for others to review might be helpful. Starting from a starter template and adding code incrementally while testing in Appwrite is also suggested. The issue seems to be with hitting the specified curl command. The build command used is `pip install -r requirements.txt`.
ChicK00o
21 Oct, 2023, 15:58

kept the same, that was part of the python starter function pip install -r requirements.txt

ChicK00o
21 Oct, 2023, 15:58

i used that as template

Drake
21 Oct, 2023, 15:58

That's weird....I'm surprised that built successfully...

ChicK00o
21 Oct, 2023, 15:59

why?

Drake
21 Oct, 2023, 15:59

Maybe you can start from a starter template and add code incrementally testing in Appwrite as you go

Drake
21 Oct, 2023, 15:59

It didn't work before

ChicK00o
21 Oct, 2023, 16:00

no the build is working fine, the issue is when i hit the curl

ChicK00o
21 Oct, 2023, 16:00

its the execution that is failing

ChicK00o
21 Oct, 2023, 16:00

with that particular error

Drake
21 Oct, 2023, 16:00

What do you mean when YOU hit the curl?

ChicK00o
21 Oct, 2023, 16:01

after i hit this, and when i check the errors for the execution

Drake
21 Oct, 2023, 16:02

Anyways, I still recommend this

Drake
21 Oct, 2023, 16:02

You can also share your code too and I can scan it quickly.

You can also try to increase the function timeout

ChicK00o
21 Oct, 2023, 16:02

did that, maxed it to 900 sec, still the same 😦

Drake
21 Oct, 2023, 16:03

And the execution fails after how long?

ChicK00o
21 Oct, 2023, 16:03

after that much time

Drake
21 Oct, 2023, 16:03

Interesting

ChicK00o
21 Oct, 2023, 16:03

the code ^^

ChicK00o
21 Oct, 2023, 16:04

i will cycle the key now

Drake
21 Oct, 2023, 16:07

You should probably not pass exceptions directly into context.err(). Maybe convert to string first

ChicK00o
21 Oct, 2023, 16:07

okay got it, let me try that, will update

Drake
21 Oct, 2023, 16:09

Technically, it is possible for there to be an infinite loop with your whiles

Drake
21 Oct, 2023, 16:09

This is still probably the best approach

ChicK00o
21 Oct, 2023, 16:29

makes sense, that is possible, will put in max retries, and the function execution is not completing , but i was expecting some of the context logs to get logged, but none did, hence, did not debug in the line of infinite loop

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