Back

[SOLVED] Functions are not setting the timeout as per the configuration in 1.4.2

  • 0
  • Functions
Abhishek
13 Sep, 2023, 13:52

Please check the attached screenshots.

I have a node function that takes around 120 seconds to complete the task. In the Appwrite console, I set the Timeout value to 240 sec, and in the docker env file the timeout variable is set to 900 seconds. However, the function throws the timeout error after 60 seconds of execution.

TL;DR
The user is experiencing an issue where functions are not setting the timeout as per the configuration in version 1.4.2. They have set the timeout value in the Appwrite console and in the docker env file, but the function throws a timeout error after 60 seconds. The solution suggested by another user is to set the `_APP_FUNCTIONS_MAINTENANCE_INTERVAL` environment variable in the .env file to `3600`. This has been confirmed to solve the issue by the original poster. No further information or screenshots are provided.
Abhishek
13 Sep, 2023, 13:53

Functions are not setting the timeout as per the configuration in 1.4.2

Drake
13 Sep, 2023, 20:03

what's that full error?

Abhishek
13 Sep, 2023, 20:07

Traceback:

TypeScript
#0 /usr/local/vendor/utopia-php/framework/src/App.php(460): {closure}('appwrite-execut...', '{"abc...', '/', 'POST', Array, 240, 'openruntimes/no...', '/storage/builds...', 'dist/main.js', Array, 0, 0, 'v3', 'cp /tmp/code.ta...', Object(Swoole\Table), Object(Utopia\Swoole\Response), Object(Utopia\Logger\Log))
#1 /usr/local/vendor/utopia-php/framework/src/App.php(659): Utopia\App->execute(Object(Utopia\Transaction), Object(Utopia\Route), Object(Utopia\Swoole\Request), Object(Utopia\Swoole\Response))
#2 /usr/local/app/http.php(1317): Utopia\App->run(Object(Utopia\Swoole\Request), Object(Utopia\Swoole\Response), Object(Utopia\Transaction))
#3 [internal function]: {closure}(Object(Swoole\Http\Request), Object(Swoole\Http\Response))
#4 {main}
Abhishek
13 Sep, 2023, 20:07

Error Message: An internal curl error has occurred within the executor! Error Msg: Connection reset by peer

Drake
13 Sep, 2023, 20:08

where is this from?

Abhishek
13 Sep, 2023, 20:09

I have configured sentry, so I'm getting error trace from it

Drake
13 Sep, 2023, 20:11

so which container is throwing this error? maybe look the logger or server_name

Abhishek
13 Sep, 2023, 20:12
Drake
13 Sep, 2023, 21:52

how is hte function being triggered? via appwrite console?

Drake
13 Sep, 2023, 22:22

@Abhishek would you please try setting this env var in your .env file?

TypeScript
_APP_FUNCTIONS_MAINTENANCE_INTERVAL=3600
Abhishek
14 Sep, 2023, 04:59

http call from web client sdk

Abhishek
14 Sep, 2023, 05:00

Sure, let me check

Abhishek
14 Sep, 2023, 05:11

Worked!

safwan
14 Sep, 2023, 05:17

[SOLVED] Functions are not setting the timeout as per the configuration in 1.4.2

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