Back

Docker error on python function Execution

  • 0
  • Functions
Ponguta_
16 Feb, 2023, 20:12

Hello again, idk why this happened, and dont know how to replicate it.

The function is set to run every two minutes (I have another function with same schedule)

Seems like after that fail, the function stops running completely

TL;DR
User is experiencing a Docker error on executing a Python function. They are wondering if they should set the default value to 180. Another user suggests checking the environment variables and provides a link for reference. There is confusion about the environment variable and the CRON parameter. User suggests watching the docker logs for the executor container to detect errors. There is a discussion about increasing the inactivity interval and creating a shell script to prevent hanging. User asks for a workaround to restart the function in case of failure. Another user suggests increasing the inactivity interval to 2-3 minutes. User mentions that after the failure, the function stops running completely.
Drake
16 Feb, 2023, 20:14

Hmm. Seems like your function isn't cleanly being cleared...there's an inactivity interval in which functions are removed if they aren't executed successfully. Maybe you can try to increase that to 2-3 minutes

Ponguta_
16 Feb, 2023, 20:19

I will do it Steven

Ponguta_
16 Feb, 2023, 20:19

Thank you

Ponguta_
16 Feb, 2023, 20:28

Btw, is it normal after that fail, the function stops its CRON execution completely?

Ponguta_
16 Feb, 2023, 20:28

if it's so, any workaround to "restart" the function?

Drake
16 Feb, 2023, 20:32

This failure is a bit more catastrophic. This is the related issue: https://github.com/appwrite/appwrite/issues/3776

Ponguta_
16 Feb, 2023, 20:41

Oh I see, so do you have any idea on how to detect this failure and then proceed to deploy again or restart?

Ill probably make an shell script for that, just to prevent hanging

Drake
16 Feb, 2023, 20:41

Instead of a shell script, did you try to increase the inactivity interval like I suggested?

Ponguta_
16 Feb, 2023, 20:44

Yes sir. I'm just talking in the case it happens again.

But yeah I increase the interval of the two functions. And no problem so far

Ponguta_
16 Feb, 2023, 20:44

Sorry if I'm being annoying πŸ˜…

Drake
16 Feb, 2023, 20:46

The interval I'm referring to is an environment variable that applies to all functions 🧐

Drake
16 Feb, 2023, 20:47

No worries. Just making sure you didn't miss that.

Anyways, the only way to detect would be to watch the docker logs for the executor container

Ponguta_
16 Feb, 2023, 20:47

Oh, I thought the CRON parameter

Ponguta_
16 Feb, 2023, 20:47

So what is the env variable?

Drake
16 Feb, 2023, 20:48
Ponguta_
16 Feb, 2023, 21:30

Reading that, seems like default value is 60, should I set it on 180?

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