Skip to content

[v0.1.6] Cronjob context and parent resource availability

Latest
Compare
Choose a tag to compare
@zepgram zepgram released this 13 Dec 15:44

Overview

This release addresses an issue related to resource connections being incorrectly terminated by child processes, which previously led to unavailable resources for the parent process. The update ensures a more reliable operation of the module, especially when used in scheduled tasks. This would unlikely occurred on a command line execution, unless your parent pid was using resource after completed children processes.

Key Changes

  1. Improved Resource Connection Management in Child Processes:
  • The update resolves a crucial issue where MySQL connections were inadvertently closed by child processes, rendering them unavailable for the parent process.
  • This fix is particularly beneficial in scenarios where the module is utilized within cron jobs, ensuring subsequent tasks in the cron schedule are not impacted by unavailable database connections.
  1. Enhanced Process Management and Stability:
    The module now employs register_shutdown_function() in child processes to forcefully terminate them using posix_kill(getmypid(), SIGKILL) upon completion of their tasks. This ensures a clean and immediate release of resources, preventing potential resource leaks or locking issues.

  2. Posix dependency
    The module now requires ext-posix as dependency in order to run.