Back

Internal curl errors has occurred within the executor

  • 0
  • Self Hosted
  • Functions
Fampv
3 Jun, 2024, 07:30

Hi, I am trying to figure out how to scale a function (multiple workers for a single function), but it doesn't run very stable. Some executions run fine but some don't, as you can see in the attached screenshot. I have duplicated the appwrite-worker-functions container 4 times, so I have a total of 5 appwrite-worker-functions containers. When I use a single worker-function container, everything works perfectly. But when I add more worker-function containers, some executions fail with the error Internal curl errors has occurred within the executor! Error Number: 110. Error Msg: Operation timed out\nError Code: 500. The openruntime-executor container logs are the following:

TypeScript
[Error] Type: Exception
[Error] Message: Internal curl errors has occurred within the executor! Error Number: 110. Error Msg: Operation timed out
[Error] File: /usr/local/app/http.php
[Error] Line: 1072

The docker-compose part of the worker-functions containers looks like this:

TypeScript
appwrite-worker-functions-1:
  image: appwrite/appwrite:1.5.7
  entrypoint: worker-functions
  # <<: *x-logging
  container_name: appwrite-worker-functions-1
  restart: unless-stopped
  # networks:
  #   - appwrite
  depends_on:
    - appwrite-redis
    - appwrite-mariadb
    - openruntimes-executor
  environment:
    - _APP_ENV
    - ... more envs
  
appwrite-worker-functions-2:
  image: appwrite/appwrite:1.5.7
  entrypoint: worker-functions
  # <<: *x-logging
  container_name: appwrite-worker-functions-2
  restart: unless-stopped
  # networks:
  #   - appwrite
  depends_on:
    - appwrite-redis
    - appwrite-mariadb
    - openruntimes-executor
  environment:
    - _APP_ENV
    - ... more envs

...+ 3 more worker-functions 
containers

I have set _APP_FUNCTIONS_CPUS to the default of 0 and _APP_WORKER_PER_CORE to the default of 6. I am using Appwrite self-hosted v1.5.7.

Any idea what would cause this issue? Or am I missing something here?

TL;DR
Developers are experiencing internal curl errors within the executor when trying to scale a function with multiple worker containers. Some executions fail with a timeout error when using 5 worker containers, but work fine with a single container. The issue might be related to resource allocation settings like `_APP_FUNCTIONS_CPUS` and `_APP_WORKER_PER_CORE`. Check if the resources are distributed correctly and adjust accordingly.
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