Reputation: 3
(1.1ms) BEGIN
SQL (1.4ms) INSERT INTO "table" ("somedata") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18) RETURNING (OTHER PROPRIETARY DATA)
(1.0ms) ROLLBACK
Errno::ECONNREFUSED: Connection refused - connect(2)
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:878:in `initialize'
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:878:in `open'
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:878:in `block in connect'
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:877:in `connect'
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:851:in `start'
from /app/vendor/bundle/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
from /app/vendor/bundle/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
from /app/vendor/bundle/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
from /app/vendor/bundle/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient.rb:72:in `post'
from /app/vendor/bundle/ruby/2.0.0/gems/tire-0.5.8/lib/tire/http/client.rb:19:in `post'
from /app/vendor/bundle/ruby/2.0.0/gems/tire-0.5.8/lib/tire/index.rb:143:in `store'
from /app/vendor/bundle/ruby/2.0.0/gems/tire-0.5.8/lib/tire/model/search.rb:148:in `block in update_index'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:403:in `_run__648734676250133765__update_elasticsearch_index__2845407700799110590__callbacks'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:405:in `__run_callback'
... 10 levels...
from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/validations.rb:50:in `save'
from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/attribute_methods/dirty.rb:22:in `save'
from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/transactions.rb:259:in `block (2 levels) in save'
from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/transactions.rb:208:in `transaction'
from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/transactions.rb:259:in `block in save'
from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/transactions.rb:270:in `rollback_active_record_state!'
from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/transactions.rb:258:in `save'
from (irb):10
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/commands/console.rb:47:in `start'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/commands/console.rb:8:in `start'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
This error occurs when i try to save to the database from heroku run console
... so basically i can read data just fine but cannot write any data i am very confused any help? i can include anything else necessary - including my database.yml file...
Upvotes: 0
Views: 342
Reputation: 8584
It looks like things are running into problems within the Tire gem. My guess is that Tire is trying to update ElasticSearch with the indexing data about the model that you're updating. Do you have ES configured and working properly within your app?
Upvotes: 1