Back

Function execution fails in production

  • 0
  • Self Hosted
  • Functions
gresakg
14 Jul, 2023, 06:59

I have a function that is working in my local environment and in the staging environment as well, but it fails in production. The execution log says

TypeScript
An internal curl error has occurred within the executor! Error Msg: Could not resolve host: 649e989077daded2055a-64b0e9611e85fdaf4658 

but I also checked the appwrite executor logs and I find an error Runtime not found inside

TypeScript
# docker logs appwrite-executor
Warming up Node.js 16.0 environment...
Warming up PHP 8.0 environment...
Warming up Ruby 3.0 environment...
Warming up Python 3.9 environment...
Removing orphan runtimes...
Successfully Warmed up Python 3.9!
Successfully Warmed up PHP 8.0!
Successfully Warmed up Node.js 16.0!
Successfully Warmed up Ruby 3.0!
[Error] Type: Exception
[Error] Message: Runtime not found. Please create the runtime.
[Error] File: /usr/src/code/app/executor.php
[Error] Line: 469
Building container : 649e989077daded2055a-64b0e9611e85fdaf4658
Build Stage completed in 0 seconds
Executing Runtime: 649e989077daded2055a-64b0e9611e85fdaf4658
[Error] Type: Exception
[Error] Message: An internal curl error has occurred within the executor! Error Msg: Could not resolve host: 649e989077daded2055a-64b0e9611e85fdaf4658
[Error] File: /usr/src/code/app/executor.php
[Error] Line: 544
Executing Runtime: 649e989077daded2055a-64b0e9611e85fdaf4658
[Error] Type: Exception
[Error] Message: An internal curl error has occurred within the executor! Error Msg: Could not resolve host: 649e989077daded2055a-64b0e9611e85fdaf4658
[Error] File: /usr/src/code/app/executor.php
[Error] Line: 544

The function uses PHP-8.0 runtime. The env variables for the function are properly set. What am I missing?

TL;DR
Function execution fails in production. The error message states "An internal curl error has occurred within the executor! Error Msg: Could not resolve host: 649e989077daded2055a-64b0e9611e85fdaf4658". The appwrite executor logs show an error "Runtime not found". The function uses PHP-8.0 runtime and the environment variables are properly set. Solution: Check if the required runtime (PHP 8.0) is properly configured and available in the production environment. If not, create the runtime. This should resolve the issue.
gresakg
14 Jul, 2023, 08:14

After a less complicated search 🙂 i found this https://discord.com/channels/564160730845151244/1115412723270946867/1115416706345611354 and it solved the problem.

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