Set a Timeout based on signals, which are more reliable than Timeout. Timeout is based on green threads.
gem "system_timer", "~> 1.0"