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
- Appwrite console is too heavy
The Appwrite console is too heavy And all of my services broken Any support , please
- router_deployment_not_found
I updated my function a few times and now i am getting the error: router_deployment_not_found I even reverted back to my original code but i am still getting th...
- Usage of the new Client() and dealing wi...
Hey guys, just a quick one - we had some web traffic the other day and it ended up bombing out - To put in perspective of how the app works, we have a Nuxt Ap...