When we create a report, it will trigger the cloud function. Now, when we try to spam the button like we will click to many times. It will trigger the cloud function many times. Now some cloud function cannot be done until the other function's execution is done.
The result of this, some cloud function will 'Executed Timeout' Because there are 50 execution are pending that is why the other will be 'Executed Timeout'. I need your help to scale up our cloud function:
_APP_FUNCTIONS_TIMEOUT=900 _APP_FUNCTIONS_BUILD_TIMEOUT=900 _APP_FUNCTIONS_CONTAINERS=10 _APP_FUNCTIONS_CPUS=0 _APP_FUNCTIONS_MEMORY=0 _APP_FUNCTIONS_MEMORY_SWAP=0 _APP_FUNCTIONS_RUNTIMES=node-21.0,node-18.0,bun-1.0 _APP_EXECUTOR_SECRET=your-secret-key _APP_EXECUTOR_HOST=http://exc1/v1 _APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes _APP_FUNCTIONS_ENVS=node-21.0,node-18.0,bun-1.0 _APP_FUNCTIONS_INACTIVE_THRESHOLD=60
These are the environments is there a variable need to be update? IN the image attached that is the resources we subscribe
Cloud functions triggered by events are run in async. There can only be one async execution run by default. Add this line - _APP_WORKERS_NUM=12
to appwrite-worker-functions
in docker-compose.yml. I used the value 12 only as an example, you can set any other value. That value will specify how many async execution can be run at the same time
Also, DO is hella expensive lmao
Also, you can create replicas of the appwrite-worker-functions container
what is Do?
Digital Ocean
what can you suggest? that has SIngapore server
Yeah APAC region tend to be a lot more expensive
Hetzner
You can use hetzner. They just launched a singapore location a few weeks back
okat thank you guys.
appwrite-worker-functions: image: appwrite/appwrite:1.5.10 entrypoint: worker-functions <<: *x-logging container_name: appwrite-worker-functions restart: unless-stopped networks: - appwrite depends_on: - redis - mariadb - openruntimes-executor environment: - _APP_ENV - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - _APP_FUNCTIONS_TIMEOUT - _APP_FUNCTIONS_BUILD_TIMEOUT - _APP_FUNCTIONS_CPUS - _APP_FUNCTIONS_MEMORY - _APP_EXECUTOR_SECRET - _APP_EXECUTOR_HOST - _APP_USAGE_STATS - _APP_DOCKER_HUB_USERNAME - _APP_DOCKER_HUB_PASSWORD - _APP_LOGGING_CONFIG - _APP_LOGGING_PROVIDER
Found this on docker-compose
basically
I will put this - _APP_WORKERS_NUM=12
under of _App_loging
am I right?
Yes
then command the docker-compose build?
or I need to down?
docker compose up -d
alright thank you
Recommended threads
- Facing issue with querying the database ...
I'm using python appwrite function. Error: ```appwrite.exception.AppwriteException: Invalid query: Attribute not found in schema: _createdAt``` Code: ``` resu...
- Node(Express) backend deployment issues
Hey folks, I’m hitting a wall with deploying my Node.js 18 app (using Express and TypeScript) to Appwrite. This is my first time with Appwrite and backend stuf...
- Appwrite installation not found
I am updating from 1.4.3 -> 1.5.11 My appwrite installation is at /root/appwrite I run the PowerShell version of the 'installing the new version' script from ...