Back

Function break without change

  • 0
  • Self Hosted
  • Functions
Milukun
19 Jun, 2023, 08:02

Does it matter if I put unrelated items at the same level as the funtions directory? Even if there is no operation deploy

TL;DR
The user is experiencing a function break that occurs inconsistently throughout the day. They mention a display bug and the icons disappearing. The function seems to work after a certain time and the icons return. The user mentions setting a variable to prevent the function from being cleaned up. They also mention a strange behavior where accessing the function's setting page cancels the timing. There is a mention of an issue with cron syntax validation and a suggestion to increase the inactivity threshold or have the function execute regularly to prevent removal. The user mentions there are no more details or errors. They consider cleaning up the directory and waiting to see if the problem reocc
Milukun
19 Jun, 2023, 08:04

Maybe I should clean up the directory and wait for a while to see if the problem happens again

safwan
19 Jun, 2023, 08:19

shouldn't be an issue

Drake
19 Jun, 2023, 19:31

Was there any more to the error?

Milukun
20 Jun, 2023, 01:34

There is no more information, only these errors

Drake
20 Jun, 2023, 01:35

Can you please share a screenshot?

Milukun
20 Jun, 2023, 01:36
Milukun
20 Jun, 2023, 01:37
Milukun
20 Jun, 2023, 01:37
Drake
20 Jun, 2023, 01:37

Thanks for the full message

Milukun
20 Jun, 2023, 01:37
Drake
20 Jun, 2023, 01:39

So the reason why this might be happening is the container gets removed (usually due to inactivity) but the removal fails so it's in this inconsistent state. Make sure to πŸ‘ this related issue https://github.com/appwrite/appwrite/issues/3776

There are some things you can do to mitigate this and they all involve preventing the runtime container from being removed.

One option is to increase the inactivity threshold (there's an environment variable for it) to a value where the runtime container won't be removed.

Another option is to have your function execute regularly (but don't do anything) so that it doesn't get considered as inactive.

You can do both of these too

Milukun
20 Jun, 2023, 01:43

Thanks for the suggestion, I'll give it a try

Milukun
20 Jun, 2023, 01:55

btw, i didn't see any wrong on " */25 * * * * "

Milukun
20 Jun, 2023, 01:55

*/25 * * * *

Milukun
20 Jun, 2023, 01:56
Drake
20 Jun, 2023, 01:59

Something seems to have broken with the cron syntax validation. See https://github.com/appwrite/appwrite/issues/5719

Milukun
20 Jun, 2023, 02:13

This is SchrΓΆdinger's cat, you set up the json file, deploy function, and then do not enter the setting page of this function, other pages can be viewed (such as logs), the timing will not be canceled, but as long as you enter the setting page, the timing will expire

Milukun
20 Jun, 2023, 02:19

even more Strange

Milukun
20 Jun, 2023, 02:20

so i set _APP_FUNCTIONS_INACTIVE_THRESHOLD=3610 , This will prevent it from being cleaned up, right?

Drake
20 Jun, 2023, 02:22

Depends on how often it executed successfully

Milukun
20 Jun, 2023, 02:22

But the good news is that the video was shot at 10:19, although all the icons have disappeared But after 10:20, the methods were all executed! And the icons came back automatically

Milukun
20 Jun, 2023, 02:22
Milukun
20 Jun, 2023, 02:23

This is more like a display bug

Milukun
20 Jun, 2023, 02:23

Currently it is executed almost every few minutes during the day, with no execution for more than an hour in the early morning

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