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
- IMPORTANT! SOC-2 Request Failing
Issue requesting SOC-2. If tried other/private browser as well as filling in optional fields.
- Appwrite-injected variables are not avai...
I am using rust-1.83 as a runtime and try to access APPWRITE_FUNCTION_API_ENDPOINT or APPWRITE_FUNCTION_API_KEY during runtime. Both are not set during my execu...
- OAuth Missing redirect URL
Hello all, on a Flutter mobile app with latest Appwrite dependency (25.4.0) I always got "Missing redirect URL" - "Your OAuth login flow is missing a proper red...