Which signal is sent to processes during free-tier Repl hibernation?
0 reputation · 07 Jun 2022, 11:34 UTC
Replit utilizes a containerized environment where free-tier Repls enter a sleep cycle when no active editor sessions or incoming traffic are detected. This hibernation mechanism terminates running processes to reclaim cloud resources.
When implementing long-running background tasks or data synchronization scripts, it is necessary to handle termination gracefully to prevent data corruption. However, it is unclear whether the platform issues a SIGTERM to allow for cleanup routines or if the container is terminated via a SIGKILL, which prevents the execution of signal handlers.
Does the Replit runtime provide a grace period for processes to catch a termination signal before the container is fully suspended? Which specific Unix signal is dispatched to the primary process during an idle-timeout event?