You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
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
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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):
The text was updated successfully, but these errors were encountered: