This repository was archived by the owner on Apr 17, 2018. It is now read-only.

Description
I could not find the place to change this timeout. Any pointers? Also, is there a way to check if there is still an active connection/tcp socket without going through a whole roundtrip (eg.g DataMapper::Repository.adapter.connection.alive?)?
This behavior is causing problems in combination with forked processes (e.g Resque workers). If the connection of the workers parents is no longer available, the child will open and close a connection for every item it processes. An ugly quick fix around this is to have the following in the workers master process (after_prefork hook):
Thread.new do
while true
DataMapper::Repository.adapters.keys.each do |repo|
DataMapper.repository(repo).adapter.select("SELECT 1;")
end
sleep 30
end
end