collectiveidea / delayed_job

Database based asynchronous priority queue system -- Extracted from Shopify
http://groups.google.com/group/delayed_job
MIT License
4.81k stars 955 forks source link

[WIP] Copy-on-Write forking (logic copied from Puma) #1160

Open johnnyshields opened 2 years ago

johnnyshields commented 2 years ago

This PR further improves #1138 by adding copy-on-write forking which forks from the first worker child to the other children. After a configurable timeout (e.g. 1 hour), it will re-fork its children from the first child.

The reason is to reduce memory usage and our AWS bill at TableCheck :)

Much of the code is copied from Puma 5, with proper attribution. (Puma is MIT licensed.)

TODOS: