[Backgroundrb-devel] actionmailer the background

hemant kumar gethemant at gmail.com
Tue Jan 15 19:22:38 EST 2008


Hi Clint,

Which version of BackgrounDRb plugin you are using? Please use trunk or
1.0.1 release tag.

Looks like your database is dropping connection. Also, you need to set,
production environment through backgroundrb.yml file, so as production
database configuration is loaded in production servers.

Something like this:

#backgroundrb.yml
:backgroundrb:
  :port: 11006
  :ip: 0.0.0.0
  :environment: production


Hope this helps.


On Tue, 2008-01-15 at 16:31 -0700, Clint Troxel wrote:
> I have bdrb successfully set up and running in a local project.  It's  
> doing two things:
> 
> 1) processing large csv files and using ActiveRecord to insert
> 2) sending large batches of emails using ActionMailer
> 
> In development both work well.  I see my ActionMailer emails in the  
> log (though it's the development.log -- odd?)
> 
> On the production server csv processing works well, but sending emails  
> throws errors in the background.
> 
> Note:  I can successfully upload a csv, then fail trying to send  
> emails, then successfully upload another csv file.  Also, sending  
> emails works in production when used outside of backgroundrb.
> 
> backgroundrb_debug.log reports this
> 
> PGError: no connection to the server
> : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc,  
> a.attnotnull
> FROM pg_attribute a LEFT JOIN pg_attrdef d
> ON a.attrelid = d.adrelid AND a.attnum = d.adnum
> WHERE a.attrelid = 'sandboxed_libraries'::regclass
> AND a.attnum > 0 AND NOT a.attisdropped
> ORDER BY a.attnum
> 
> /usr/local/projects/ecera/vendor/rails/activerecord/lib/active_record/ 
> connection_adapters/abstract_adapter.rb:128:in `log'
> /usr/local/projects/ecera/vendor/rails/activerecord/lib/active_record/ 
> connection_adapters/postgresql_adapter.rb:142:in `query'
> /usr/local/projects/ecera/vendor/rails/activerecord/lib/active_record/ 
> connection_adapters/postgresql_adapter.rb:528:in `column_definitions'
> /usr/local/projects/ecera/vendor/rails/activerecord/lib/active_record/ 
> connection_adapters/postgresql_adapter.rb:223:in `columns'
> 
> Can't seem to turn anything up after a day of googling.
> Does this ring any bells?
> 
> Thanks,
> Clint
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel



More information about the Backgroundrb-devel mailing list