I have lots of daemons and inevitably after a couple of days of
running one or more of them will lose connection to the database.
Not all of them. Just some of them and it's always a random one. I
have attached the errors to the bottom. These daemons run on
different servers so it's not always the same server that has this
problem. Stopping and restarting the daemon fixes the problem.
Postgres logs show nothing while the error is happening.
I asked the postgres list and they said it might be thread
related. I used to have
ActiveRecord::Base.connection_pool.clear_stale_cached_connections!
in my daemons so I took that out hoping it would solve the problem
and it hasn't.
2010-12-19 10:19:38 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:38 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:39 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:39 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:40 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:41 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:41 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:41 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:42 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:42 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:43 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:43 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:44 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:44 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:45 digg_story_worker.rb ERROR PGError: lost
synchronization with server: got message type "o", length
544501536
2010-12-19 10:19:45 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:46 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:47 url_expire_worker.rb ERROR PGError: lost
synchronization with server: got message type "�", length
-65536
2010-12-19 10:19:51 digg_story_worker.rb ERROR PGError: lost
synchronization with server: got message type "o", length
544501536
2010-12-19 10:19:57 digg_story_worker.rb ERROR PGError: lost
synchronization with server: got message type "o", length
544501536
2010-12-19 10:20:03 digg_story_worker.rb ERROR PGError: lost
synchronization with server: got message type "o", length
544501536
2010-12-19 10:20:09 digg_story_worker.rb ERROR PGError: lost
synchronization with server: got message type "o", length
544501536
2010-12-19 10:20:15 digg_story_worker.rb ERROR PGError: lost
synchronization with server: got message type "o", length
544501536
2010-12-19 10:20:21 digg_story_worker.rb ERROR PGError: lost
synchronization with server: got message type "o", length
544501536