Deployed Function Not Executing Child Process for Video Conversion
- 0
- Self Hosted
- Functions
- Databases
- Storage
I'm encountering an issue with my video conversion function. Locally (using the appwrite-cli) the function works as expected, including spawning a child process to convert video files. However, after deployment on my server (Appwrite 1.6.0), the function only creates the document and does not execute the child process to start the conversion.
Details:
- **Local Behavior: ** When run locally via appwrite-cli, the function successfully spawns a child process (using Node's
child_process
) to convert videos into different sizes. The function logs and conversion progress work fine. - Deployed Behavior: After deploying the function, the document is created as expected, but it appears that the child process is not being executed on the server. All permissions are set correctly (even trying ANY CRUD), so I suspect an environment limitation or configuration issue.
- ** Execution Time Limit:** The function's execution time is limited to 900 seconds. I am using the background process to offload the conversion, ensuring the user does not have to wait. Unfortunately, due to the use of
child_process
, I cannot retrieve logs from the spawned process for debugging.
Questions:
- Is there a known limitation or special configuration required for using child_process in deployed Appwrite functions?
- Is it possible to inspect or retrieve logs from within the Docker container running the function — additionally mounting the temporary folder — to better diagnose the issue?
- Are there any recommended workarounds or best practices for running long-running background tasks (child processes) in a deployed Appwrite environment?
For your reference, I have documented the function and provided all relevant files in my GitHub repository: https://github.com/Vanillabacke/appwrite-cargoose-function
Thank you for your help!
Recommended threads
- Wrong number of items (databases, docume...
On the project page in the Appwrite Console, the dashboard says I have 6 databases and 242k devices, while when I count the databases I have 5, and counting the...
- Firing custom notifications from backend...
Hi there! I'm trying to send notifications from my backend (a Dart app using a self-hosted Appwrite instance) to Flutter clients. Currently I'm updating a docum...
- Which type of user is that?
When a user creates a session with an email, for example: email: 2@email.com In account prefs permission will be "$permissions": [ "read(\"user:2\")", "update(\...