I have a problem with my Rails app.
App based on Ruby on Rails with Sidekiq, Redis and deployed on Heroku.
I don't know why my worker doesn't work on Heroku. I think something is wrong in my settings.
config/initializers/sidekiq.rb
Sidekiq.configure_server do |config|
config.redis = { url: 'redis://localhost:6379/0' }
schedule_file = "config/sidekiq.yml"
if File.exists?(schedule_file)
Sidekiq::Cron::Job.load_from_hash YAML.load_file(schedule_file)
end
end
Sidekiq.configure_client do |config|
config.redis = { url: 'redis://localhost:6379/0' }
end
workers/my_worker.rb
class MyWorker
include Sidekiq::Worker
def perform
......
end
end
config/sidekiq.yml
my_photos:
cron: "30 3 */2 * *"
class: "MyWorker"
queue: default
Procfile
web: bundle exec rails server -p $PORT
worker: bundle exec sidekiq -e production
application.rb includes line:
config.active_job.queue_adapter = :sidekiq
I have installed Redis To Go on Heroku.
Heroku config:
REDISTOGO_URL: redis://redistogo:2085d9ff......
REDIS_PROVIDER: REDISTOGO_URL
.
.
.
Everything works fine on localhost development and production mode (worker too) but on Heroku worker doesn't work well.
Some errors:
Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED)
heroku ps in console displays:
=== web (Free): bundle exec rails server -p $PORT (1)
web.1: up 2019/09/18 16:57:03 +0200
=== worker (Free): bundle exec sidekiq -e production (1)
worker.1: crashed 2019/09/18 17:27:42 +0200
Yes, I restarted Heroku.
***
Heroku logs after change config.redis to ENV['REDISTOGO_URL'] in sidekiq.rb
2019-09-18T16:29:30.621771+00:00 app[web.1]: => Booting Puma
2019-09-18T16:29:30.621789+00:00 app[web.1]: => Rails 5.2.3 application starting in production
2019-09-18T16:29:30.62179+00:00 app[web.1]: => Run `rails server -h` for more startup options
2019-09-18T16:29:30.621791+00:00 app[web.1]: Puma starting in single mode...
2019-09-18T16:29:30.621792+00:00 app[web.1]: * Version 3.12.1 (ruby 2.6.1-p33), codename: Llamas in Pajamas
2019-09-18T16:29:30.621793+00:00 app[web.1]: * Min threads: 5, max threads: 5
2019-09-18T16:29:30.621796+00:00 app[web.1]: * Environment: production
2019-09-18T16:29:30.621797+00:00 app[web.1]: * Listening on tcp://0.0.0.0:42164
2019-09-18T16:29:30.621798+00:00 app[web.1]: Use Ctrl-C to stop
2019-09-18T16:29:30.621799+00:00 app[web.1]: I, [2019-09-18T16:29:30.621672 #4] INFO -- : [2fa14d58-5519-456e-a527-9cf4ed462e86] Started GET "/dogs" for 195.136.56.0 at 2019-09-18 16:29:30 +0000
2019-09-18T16:29:30.62264+00:00 app[web.1]: I, [2019-09-18T16:29:30.622583 #4] INFO -- : [2fa14d58-5519-456e-a527-9cf4ed462e86] Processing by DogsController#index as HTML
2019-09-18T16:29:30.683193+00:00 app[web.1]: D, [2019-09-18T16:29:30.683061 #4] DEBUG -- : [2fa14d58-5519-456e-a527-9cf4ed462e86] User Load (1.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 1], ["LIMIT", 1]]
2019-09-18T16:29:30.704369+00:00 app[web.1]: I, [2019-09-18T16:29:30.704248 #4] INFO -- : [2fa14d58-5519-456e-a527-9cf4ed462e86] Rendering dogs/index.html.erb within layouts/application
2019-09-18T16:29:30.708316+00:00 app[web.1]: D, [2019-09-18T16:29:30.708230 #4] DEBUG -- : [2fa14d58-5519-456e-a527-9cf4ed462e86] Dog Load (1.5ms) SELECT "dogs".* FROM "dogs" ORDER BY created_at DESC LIMIT $1 OFFSET $2 [["LIMIT", 24], ["OFFSET", 0]]
2019-09-18T16:29:30.715597+00:00 app[web.1]: I, [2019-09-18T16:29:30.715534 #4] INFO -- : [2fa14d58-5519-456e-a527-9cf4ed462e86] Rendered dogs/index.html.erb within layouts/application (11.2ms)
2019-09-18T16:29:30.718909+00:00 app[web.1]: I, [2019-09-18T16:29:30.718852 #4] INFO -- : [2fa14d58-5519-456e-a527-9cf4ed462e86] Completed 200 OK in 96ms (Views: 13.8ms | ActiveRecord: 28.1ms)
2019-09-18T16:29:32.200757+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=myappaddress.herokuapp.com request_id=77ecb62d-e044-4eee-be8c-a0f0749af788 fwd="195.136.56.0" dyno=web.1 connect=0ms service=1ms status=200 bytes=143 protocol=https
2019-09-18T16:29:32.047254+00:00 app[web.1]: I, [2019-09-18T16:29:32.047168 #4] INFO -- : [2bfdeee1-c974-4a9e-97ac-659f58d14a0d] Started GET "/dogs" for 195.136.56.0 at 2019-09-18 16:29:32 +0000
2019-09-18T16:29:32.047891+00:00 app[web.1]: I, [2019-09-18T16:29:32.047835 #4] INFO -- : [2bfdeee1-c974-4a9e-97ac-659f58d14a0d] Processing by DogsController#index as HTML
2019-09-18T16:29:32.051783+00:00 app[web.1]: D, [2019-09-18T16:29:32.051719 #4] DEBUG -- : [2bfdeee1-c974-4a9e-97ac-659f58d14a0d] User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 1], ["LIMIT", 1]]
2019-09-18T16:29:32.053487+00:00 app[web.1]: I, [2019-09-18T16:29:32.053403 #4] INFO -- : [2bfdeee1-c974-4a9e-97ac-659f58d14a0d] Rendering dogs/index.html.erb within layouts/application
2019-09-18T16:29:32.054812+00:00 app[web.1]: D, [2019-09-18T16:29:32.054749 #4] DEBUG -- : [2bfdeee1-c974-4a9e-97ac-659f58d14a0d] Dog Load (1.0ms) SELECT "dogs".* FROM "dogs" ORDER BY created_at DESC LIMIT $1 OFFSET $2 [["LIMIT", 24], ["OFFSET", 0]]
2019-09-18T16:29:32.055346+00:00 app[web.1]: I, [2019-09-18T16:29:32.055289 #4] INFO -- : [2bfdeee1-c974-4a9e-97ac-659f58d14a0d] Rendered dogs/index.html.erb within layouts/application (1.8ms)
2019-09-18T16:29:32.056958+00:00 app[web.1]: I, [2019-09-18T16:29:32.056901 #4] INFO -- : [2bfdeee1-c974-4a9e-97ac-659f58d14a0d] Completed 200 OK in 9ms (Views: 2.7ms | ActiveRecord: 1.9ms)
2019-09-18T16:29:32.059156+00:00 heroku[router]: at=info method=GET path="/dogs" host=myappaddress.herokuapp.com request_id=2bfdeee1-c974-4a9e-97ac-659f58d14a0d fwd="195.136.56.0" dyno=web.1 connect=0ms service=14ms status=200 bytes=2828 protocol=https
2019-09-18T16:29:33.373311+00:00 heroku[router]: at=info method=GET path="/dogs" host=myappaddress.herokuapp.com request_id=953acff7-12c6-4876-99eb-57686a8e054b fwd="195.136.56.0" dyno=web.1 connect=0ms service=15ms status=200 bytes=2850 protocol=https
2019-09-18T16:29:33.360115+00:00 app[web.1]: I, [2019-09-18T16:29:33.360015 #4] INFO -- : [953acff7-12c6-4876-99eb-57686a8e054b] Started GET "/dogs" for 195.136.56.0 at 2019-09-18 16:29:33 +0000
2019-09-18T16:29:33.360839+00:00 app[web.1]: I, [2019-09-18T16:29:33.360763 #4] INFO -- : [953acff7-12c6-4876-99eb-57686a8e054b] Processing by DogsController#index as HTML
2019-09-18T16:29:33.364996+00:00 app[web.1]: D, [2019-09-18T16:29:33.364927 #4] DEBUG -- : [953acff7-12c6-4876-99eb-57686a8e054b] User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 1], ["LIMIT", 1]]
2019-09-18T16:29:33.36734+00:00 app[web.1]: I, [2019-09-18T16:29:33.367264 #4] INFO -- : [953acff7-12c6-4876-99eb-57686a8e054b] Rendering dogs/index.html.erb within layouts/application
2019-09-18T16:29:33.368712+00:00 app[web.1]: D, [2019-09-18T16:29:33.368637 #4] DEBUG -- : [953acff7-12c6-4876-99eb-57686a8e054b] Dog Load (1.0ms) SELECT "dogs".* FROM "dogs" ORDER BY created_at DESC LIMIT $1 OFFSET $2 [["LIMIT", 24], ["OFFSET", 0]]
2019-09-18T16:29:33.370049+00:00 app[web.1]: I, [2019-09-18T16:29:33.369947 #4] INFO -- : [953acff7-12c6-4876-99eb-57686a8e054b] Rendered dogs/index.html.erb within layouts/application (2.6ms)
2019-09-18T16:29:33.371552+00:00 app[web.1]: I, [2019-09-18T16:29:33.371479 #4] INFO -- : [953acff7-12c6-4876-99eb-57686a8e054b] Completed 200 OK in 10ms (Views: 2.8ms | ActiveRecord: 1.9ms)
2019-09-18T16:29:33.506177+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=myappaddress.herokuapp.com request_id=11c98ea8-5df1-4a9f-9a5a-fb609bf1f9b1 fwd="195.136.56.0" dyno=web.1 connect=0ms service=1ms status=200 bytes=143 protocol=https
2019-09-18T16:29:37.398927+00:00 heroku[web.1]: source=web.1 dyno=heroku.146423817.b27d01ed-7668-4c8c-9451-68f3c0f447c7 sample#memory_total=143.53MB sample#memory_rss=104.20MB sample#memory_cache=39.34MB sample#memory_swap=0.00MB sample#memory_pgpgin=51710pages sample#memory_pgpgout=14966pages sample#memory_quota=512.00MB
2019-09-18T16:29:54.267638+00:00 app[api]: Starting process with command `bin/rails console` by user myemail#o2.pl
2019-09-18T16:29:55.487272+00:00 heroku[router]: at=info method=GET path="/dogs" host=myappaddress.herokuapp.com request_id=4318929d-efc2-4ad1-ad0d-c0a9ae155a8c fwd="195.136.56.0" dyno=web.1 connect=0ms service=14ms status=200 bytes=2840 protocol=https
2019-09-18T16:29:55.474089+00:00 app[web.1]: I, [2019-09-18T16:29:55.473957 #4] INFO -- : [4318929d-efc2-4ad1-ad0d-c0a9ae155a8c] Started GET "/dogs" for 195.136.56.0 at 2019-09-18 16:29:55 +0000
2019-09-18T16:29:55.475425+00:00 app[web.1]: I, [2019-09-18T16:29:55.475356 #4] INFO -- : [4318929d-efc2-4ad1-ad0d-c0a9ae155a8c] Processing by DogsController#index as HTML
2019-09-18T16:29:55.478716+00:00 app[web.1]: D, [2019-09-18T16:29:55.478637 #4] DEBUG -- : [4318929d-efc2-4ad1-ad0d-c0a9ae155a8c] User Load (1.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 1], ["LIMIT", 1]]
2019-09-18T16:29:55.480624+00:00 app[web.1]: I, [2019-09-18T16:29:55.480549 #4] INFO -- : [4318929d-efc2-4ad1-ad0d-c0a9ae155a8c] Rendering dogs/index.html.erb within layouts/application
2019-09-18T16:29:55.481962+00:00 app[web.1]: D, [2019-09-18T16:29:55.481884 #4] DEBUG -- : [4318929d-efc2-4ad1-ad0d-c0a9ae155a8c] Dog Load (1.0ms) SELECT "dogs".* FROM "dogs" ORDER BY created_at DESC LIMIT $1 OFFSET $2 [["LIMIT", 24], ["OFFSET", 0]]
2019-09-18T16:29:55.483895+00:00 app[web.1]: I, [2019-09-18T16:29:55.483823 #4] INFO -- : [4318929d-efc2-4ad1-ad0d-c0a9ae155a8c] Rendered dogs/index.html.erb within layouts/application (3.2ms)
2019-09-18T16:29:55.484818+00:00 app[web.1]: I, [2019-09-18T16:29:55.484747 #4] INFO -- : [4318929d-efc2-4ad1-ad0d-c0a9ae155a8c] Completed 200 OK in 9ms (Views: 3.4ms | ActiveRecord: 2.0ms)
2019-09-18T16:29:55.629132+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=myappaddress.herokuapp.com request_id=d2dc2b32-bf0c-42b0-b0ee-e688014a1858 fwd="195.136.56.0" dyno=web.1 connect=0ms service=2ms status=200 bytes=143 protocol=https
2019-09-18T16:29:56.6973+00:00 heroku[router]: at=info method=GET path="/dogs" host=myappaddress.herokuapp.com request_id=22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf fwd="195.136.56.0" dyno=web.1 connect=1ms service=14ms status=200 bytes=2850 protocol=https
2019-09-18T16:29:56.832815+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=myappaddress.herokuapp.com request_id=d76015da-381e-422d-8cfa-60d277ead4b8 fwd="195.136.56.0" dyno=web.1 connect=0ms service=1ms status=200 bytes=143 protocol=https
2019-09-18T16:29:56.683482+00:00 app[web.1]: I, [2019-09-18T16:29:56.683384 #4] INFO -- : [22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf] Started GET "/dogs" for 195.136.56.0 at 2019-09-18 16:29:56 +0000
2019-09-18T16:29:56.684878+00:00 app[web.1]: I, [2019-09-18T16:29:56.684813 #4] INFO -- : [22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf] Processing by DogsController#index as HTML
2019-09-18T16:29:56.688315+00:00 app[web.1]: D, [2019-09-18T16:29:56.688210 #4] DEBUG -- : [22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf] User Load (1.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 1], ["LIMIT", 1]]
2019-09-18T16:29:56.690898+00:00 app[web.1]: I, [2019-09-18T16:29:56.690833 #4] INFO -- : [22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf] Rendering dogs/index.html.erb within layouts/application
2019-09-18T16:29:56.692612+00:00 app[web.1]: D, [2019-09-18T16:29:56.692550 #4] DEBUG -- : [22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf] Dog Load (1.1ms) SELECT "dogs".* FROM "dogs" ORDER BY created_at DESC LIMIT $1 OFFSET $2 [["LIMIT", 24], ["OFFSET", 0]]
2019-09-18T16:29:56.693963+00:00 app[web.1]: I, [2019-09-18T16:29:56.693898 #4] INFO -- : [22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf] Rendered dogs/index.html.erb within layouts/application (2.9ms)
2019-09-18T16:29:56.695684+00:00 app[web.1]: I, [2019-09-18T16:29:56.695620 #4] INFO -- : [22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf] Completed 200 OK in 11ms (Views: 3.9ms | ActiveRecord: 2.2ms)
2019-09-18T16:29:58.295567+00:00 app[web.1]: I, [2019-09-18T16:29:58.295456 #4] INFO -- : [98a19c4a-cdda-4112-bb38-5869ede78b49] Started GET "/dogs" for 195.136.56.0 at 2019-09-18 16:29:58 +0000
2019-09-18T16:29:58.297473+00:00 app[web.1]: I, [2019-09-18T16:29:58.297393 #4] INFO -- : [98a19c4a-cdda-4112-bb38-5869ede78b49] Processing by DogsController#index as HTML
2019-09-18T16:29:58.301213+00:00 app[web.1]: D, [2019-09-18T16:29:58.301128 #4] DEBUG -- : [98a19c4a-cdda-4112-bb38-5869ede78b49] User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 1], ["LIMIT", 1]]
2019-09-18T18:45:05.749467+00:00 heroku[web.1]: source=web.1 dyno=heroku.146423817.2c282eb9-e271-478a-a164-ab1ee7b48d15 sample#load_avg_1m=0.35
2019-09-18T18:45:05.779083+00:00 heroku[web.1]: source=web.1 dyno=heroku.146423817.2c282eb9-e271-478a-a164-ab1ee7b48d15 sample#memory_total=141.63MB sample#memory_rss=102.39MB sample#memory_cache=39.24MB sample#memory_swap=0.00MB sample#memory_pgpgin=51236pages sample#memory_pgpgout=14978pages sample#memory_quota=512.00MB
Sidekiq logs:
2019-09-18T21:42:34.875Z pid=2604 tid=gmvw62cjk class=FlickrWorker jid=d4d37c3accf6190b8193758d elapsed=5.561 INFO: fail
2019-09-18T21:42:34.875Z pid=2604 tid=gmvw62cjk WARN: {"context":"Job raised exception","job":{"queue":"default","args":[],"class":"FlickrWorker","retry":true,"jid":"d4d37c3accf6190b8193758d","created_at":1568805601.6104372,"enqueued_at":1568842949.307712,"error_message":"could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use","error_class":"ActiveRecord::ConnectionTimeoutError","failed_at":1568805607.190152,"retry_count":5,"retried_at":1568806408.705434},"jobstr":"{\"queue\":\"default\",\"args\":[],\"class\":\"FlickrWorker\",\"retry\":true,\"jid\":\"d4d37c3accf6190b8193758d\",\"created_at\":1568805601.6104372,\"enqueued_at\":1568842949.307712,\"error_message\":\"could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use\",\"error_class\":\"ActiveRecord::ConnectionTimeoutError\",\"failed_at\":1568805607.190152,\"retry_count\":5,\"retried_at\":1568806408.705434}"}
2019-09-18T21:42:34.875Z pid=2604 tid=gmvw62cjk WARN: ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use
2019-09-18T21:42:34.875Z pid=2604 tid=gmvw62cjk WARN: /home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:201:in `block in wait_poll'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `loop'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `wait_poll'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:151:in `internal_poll'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:277:in `internal_poll'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:145:in `block in poll'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/2.6.0/monitor.rb:230:in `mon_synchronize'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:155:in `synchronize'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:145:in `poll'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:799:in `acquire_connection'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:523:in `checkout'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in `connection'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1014:in `retrieve_connection'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:90:in `connection'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation/calculations.rb:196:in `block in pluck'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation.rb:584:in `skip_query_cache_if_necessary'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation/calculations.rb:196:in `pluck'
/home/miro/ror/my-app/app/workers/flickr_worker.rb:11:in `block in perform'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/flickraw-0.9.10/lib/flickraw/response.rb:42:in `block in each'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/flickraw-0.9.10/lib/flickraw/response.rb:42:in `each'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/flickraw-0.9.10/lib/flickraw/response.rb:42:in `each'
/home/miro/ror/my-app/app/workers/flickr_worker.rb:11:in `reject'
/home/miro/ror/my-app/app/workers/flickr_worker.rb:11:in `perform'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:193:in `execute_job'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:161:in `block (2 levels) in process'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/middleware/chain.rb:134:in `invoke'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:160:in `block in process'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:133:in `block (6 levels) in dispatch'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/job_retry.rb:107:in `local'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:132:in `block (5 levels) in dispatch'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/rails.rb:43:in `block in call'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/execution_wrapper.rb:87:in `wrap'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/reloader.rb:73:in `block in wrap'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/execution_wrapper.rb:87:in `wrap'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/reloader.rb:72:in `wrap'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/rails.rb:42:in `call'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:128:in `block (4 levels) in dispatch'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:254:in `stats'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:123:in `block (3 levels) in dispatch'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/job_logger.rb:13:in `call'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:122:in `block (2 levels) in dispatch'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/job_retry.rb:75:in `global'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:121:in `block in dispatch'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/logger.rb:16:in `with_context'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/job_logger.rb:27:in `with_job_hash_context'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:120:in `dispatch'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:159:in `process'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:78:in `process_one'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:68:in `run'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/util.rb:17:in `watchdog'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/util.rb:26:in `block in safe_thread'
2019-09-18T21:42:34.876Z pid=2604 tid=ov922z8j8 class=FlickrWorker jid=73817a6886c934cc0e57d83c INFO: start
2019-09-18T21:42:34.907Z pid=2604 tid=gmvw62ctw class=FlickrWorker jid=f7a4c1d1e5da2939db1202ae elapsed=5.591 INFO: fail
2019-09-18T21:42:34.907Z pid=2604 tid=gmvw62ctw WARN: {"context":"Job raised exception","job":{"queue":"default","args":[],"class":"FlickrWorker","retry":true,"jid":"f7a4c1d1e5da2939db1202ae","created_at":1568806211.883125,"enqueued_at":1568842949.3102987,"error_message":"could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use","error_class":"ActiveRecord::ConnectionTimeoutError","failed_at":1568806217.393686,"retry_count":5,"retried_at":1568806883.9672208},"jobstr":"{\"queue\":\"default\",\"args\":[],\"class\":\"FlickrWorker\",\"retry\":true,\"jid\":\"f7a4c1d1e5da2939db1202ae\",\"created_at\":1568806211.883125,\"enqueued_at\":1568842949.3102987,\"error_message\":\"could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use\",\"error_class\":\"ActiveRecord::ConnectionTimeoutError\",\"failed_at\":1568806217.393686,\"retry_count\":5,\"retried_at\":1568806883.9672208}"}
2019-09-18T21:42:34.907Z pid=2604 tid=gmvw62ctw WARN: ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use
2019-09-18T21:42:34.908Z pid=2604 tid=gmvw62ctw WARN: /home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:201:in `block in wait_poll'
heroku logs | grep worker
2019-09-18T17:31:17.211968+00:00 heroku[worker.1]: Starting process with command `bundle exec sidekiq -e production`
2019-09-18T17:31:17.859475+00:00 heroku[worker.1]: State changed from starting to up
2019-09-18T17:31:21.738484+00:00 app[worker.1]: pid=4 tid=gq4np076o INFO: Booting Sidekiq 6.0.0 with redis options {:url=>"redis://redistogo:REDACTED#porgy.redistogo.com:11228/", :id=>"Sidekiq-server-PID-4"}
2019-09-18T17:31:21.766614+00:00 app[worker.1]: pid=4 tid=gq4np076o INFO: Cron Jobs - add job with name: flickr_photos
2019-09-18T17:31:23.288563+00:00 app[worker.1]: pid=4 tid=gq4np076o INFO: Running in ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]
2019-09-18T17:31:23.288599+00:00 app[worker.1]: pid=4 tid=gq4np076o INFO: See LICENSE and the LGPL-3.0 for licensing details.
2019-09-18T17:31:23.288602+00:00 app[worker.1]: pid=4 tid=gq4np076o INFO: Upgrade to Sidekiq Pro for more features and support: http://sidekiq.org
2019-09-18T17:31:23.289887+00:00 app[worker.1]: You are using Redis v3.2.12, Sidekiq requires Redis v4.0.0 or greater
2019-09-18T17:31:23.289931+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/cli.rb:59:in `run'
2019-09-18T17:31:23.289932+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.0.0/bin/sidekiq:12:in `<top (required)>'
2019-09-18T17:31:23.289933+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/bin/sidekiq:23:in `load'
2019-09-18T17:31:23.289934+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/bin/sidekiq:23:in `<top (required)>'
2019-09-18T17:31:23.289935+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:74:in `load'
2019-09-18T17:31:23.289936+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
2019-09-18T17:31:23.289937+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:28:in `run'
2019-09-18T17:31:23.289938+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli.rb:465:in `exec'
2019-09-18T17:31:23.289939+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
2019-09-18T17:31:23.28994+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
2019-09-18T17:31:23.289941+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
2019-09-18T17:31:23.289943+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli.rb:27:in `dispatch'
2019-09-18T17:31:23.289943+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
2019-09-18T17:31:23.289944+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli.rb:18:in `start'
2019-09-18T17:31:23.289945+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/exe/bundle:30:in `block in <top (required)>'
2019-09-18T17:31:23.289946+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
2019-09-18T17:31:23.289947+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/exe/bundle:22:in `<top (required)>'
2019-09-18T17:31:23.289948+00:00 app[worker.1]: /app/bin/bundle:3:in `load'
2019-09-18T17:31:23.289949+00:00 app[worker.1]: /app/bin/bundle:3:in `<main>'
2019-09-18T17:31:23.357667+00:00 heroku[worker.1]: Process exited with status 1
2019-09-18T17:31:23.411452+00:00 heroku[worker.1]: State changed from up to crashed
John is correct, Sidekiq 6 requires at least Redis 4, but Redis To Go has not updated from version 3.
Instead of downgrading to meet the requirements of Redis To Go i would recommended moving dependencies.
Since you are using Heroku, two popular alternatives are Heroku Redis and Redis Cloud.
Since Redis 4 was released 2.5 years ago and Redis 5 is already released, its safe to say that Redis To Go is falling behind and you should strongly consider moving to a dependency that gets updated more frequently.
Neglecting to do so will be more difficult in the long run.
Seems to be a versioning issue:
Sidekiq 6 requires Redis 4, but RedisToGo as provided by Heroku is still using Redis 3.x
I stepped around the problem by specifying in my Gemfile:
gem 'sidekiq', '5.2.7'
You have your redis URL hardcoded in config/initializers/sidekiq.rb
Instead of:
config.redis = { url: 'redis://localhost:6379/0' }
use
config.redis = { url: ENV['REDIS_URL'] }
and ensure REDIS_URL set correctly on heroku (maybe set it manually or maybe the add-on or heroku takes care of it, I don't remember).
Related
I try to deploy my rails app to heroku. I get issue in logs.
2019-09-05T21:30:24.764421+00:00 app[web.1]: D, [2019-09-05T21:30:24.764290 #10] DEBUG -- : [3adcd749-6637-4790-8b0d-dab833c46c47] [1m[36mUser Create (16.1ms)[0m [1m[32mINSERT INTO "users" ("name", "email", "note", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", ""], ["email", ""], ["note", ""], ["created_at", "2019-09-05 21:30:24.745537"], ["updated_at", "2019-09-05 21:30:24.745537"]]
2019-09-05T21:30:24.766999+00:00 app[web.1]: D, [2019-09-05T21:30:24.766917 #10] DEBUG -- : [3adcd749-6637-4790-8b0d-dab833c46c47] [1m[35m (2.0ms)[0m [1m[35mCOMMIT[0m
2019-09-05T21:30:24.771504+00:00 app[web.1]: I, [2019-09-05T21:30:24.771419 #10] INFO -- : [3adcd749-6637-4790-8b0d-dab833c46c47] Completed 500 Internal Server Error in 161ms (ActiveRecord: 47.8ms)
2019-09-05T21:30:24.772177+00:00 app[web.1]: F, [2019-09-05T21:30:24.772096 #10] FATAL -- : [3adcd749-6637-4790-8b0d-dab833c46c47]
2019-09-05T21:30:24.772242+00:00 app[web.1]: F, [2019-09-05T21:30:24.772179 #10] FATAL -- : [3adcd749-6637-4790-8b0d-dab833c46c47] Redis::CannotConnectError (Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED)):
2019-09-05T21:30:24.772293+00:00 app[web.1]: F, [2019-09-05T21:30:24.772241 #10] FATAL -- : [3adcd749-6637-4790-8b0d-dab833c46c47]
2019-09-05T21:30:24.772375+00:00 app[web.1]: F, [2019-09-05T21:30:24.772316 #10] FATAL -- : [3adcd749-6637-4790-8b0d-dab833c46c47] app/controllers/users_controller.rb:25:in block in create'
2019-09-05T21:30:24.772377+00:00 app[web.1]: [3adcd749-6637-4790-8b0d-dab833c46c47] app/controllers/users_controller.rb:23:increate'
2019-09-05T21:30:24.727793+00:00 heroku[router]: at=info method=POST path="/users" host=mailme-reminder.herokuapp.com request_id=3adcd749-6637-4790-8b0d-dab833c46c47 fwd="189.159.252.164" dyno=web.1 connect=1ms service=178ms status=500 bytes=1827 protocol=https
2019-09-05T21:30:24.913280+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=mailme-reminder.herokuapp.com request_id=df1321b0-44d2-46ef-9015-45a7f2fc8c38 fwd="189.159.252.164" dyno=web.1 connect=1ms service=4ms status=304 bytes=48 protocol=https
2019-09-05T21:31:09.129802+00:00 app[web.1]: I, [2019-09-05T21:31:09.129668 #10] INFO -- : [17ce6b70-1cd1-4b7e-b7b8-2a8b79f09643] Started GET "/" for 189.159.252.164 at 2019-09-05 21:31:09 +0000
2019-09-05T21:31:09.131458+00:00 app[web.1]: I, [2019-09-05T21:31:09.131337 #10] INFO -- : [17ce6b70-1cd1-4b7e-b7b8-2a8b79f09643] Processing by UsersController#new as HTML
2019-09-05T21:31:09.138108+00:00 app[web.1]: I, [2019-09-05T21:31:09.138004 #10] INFO -- : [17ce6b70-1cd1-4b7e-b7b8-2a8b79f09643] Rendering users/new.html.erb within layouts/application
2019-09-05T21:31:09.142089+00:00 app[web.1]: I, [2019-09-05T21:31:09.142006 #10] INFO -- : [17ce6b70-1cd1-4b7e-b7b8-2a8b79f09643] Rendered users/new.html.erb within layouts/application (3.8ms)
2019-09-05T21:31:09.144723+00:00 app[web.1]: I, [2019-09-05T21:31:09.144626 #10] INFO -- : [17ce6b70-1cd1-4b7e-b7b8-2a8b79f09643] Completed 200 OK in 13ms (Views: 9.4ms | ActiveRecord: 0.0ms)
2019-09-05T21:31:09.101818+00:00 heroku[router]: at=info method=GET path="/" host=mailme-reminder.herokuapp.com request_id=17ce6b70-1cd1-4b7e-b7b8-2a8b79f09643 fwd="189.159.252.164" dyno=web.1 connect=1ms service=19ms status=200 bytes=5496 protocol=https
2019-09-05T21:31:26.058494+00:00 heroku[router]: at=info method=POST path="/users" host=mailme-reminder.herokuapp.com request_id=63bbddba-107e-47b5-a0ee-ca8da83a6b0e fwd="189.159.252.164" dyno=web.1 connect=1ms service=26ms status=500 bytes=1827 protocol=https
2019-09-05T21:31:26.085304+00:00 app[web.1]: I, [2019-09-05T21:31:26.085200 #14] INFO -- : [63bbddba-107e-47b5-a0ee-ca8da83a6b0e] Started POST "/users" for 189.159.252.164 at 2019-09-05 21:31:26 +0000
2019-09-05T21:31:26.086465+00:00 app[web.1]: I, [2019-09-05T21:31:26.086388 #14] INFO -- : [63bbddba-107e-47b5-a0ee-ca8da83a6b0e] Processing by UsersController#create as HTML
2019-09-05T21:31:26.086570+00:00 app[web.1]: I, [2019-09-05T21:31:26.086505 #14] INFO -- : [63bbddba-107e-47b5-a0ee-ca8da83a6b0e] Parameters: {"utf8"=>"✓", "authenticity_token"=>"DNicK64JMa2ApcaSeYrP84zdeZe7hDYc2HZktB0ObXp4IVmCobV4KJQnZ9UazBiROfn6sE/jsCredCh6HzMgwg==", "user"=>{"name"=>"Michael", "email"=>"example_email#example.com", "date_and_time"=>"2019/09/05 17:00", "note"=>"Check"}, "commit"=>"Remind Me"}
2019-09-05T21:31:26.092268+00:00 app[web.1]: D, [2019-09-05T21:31:26.092172 #14] DEBUG -- : [63bbddba-107e-47b5-a0ee-ca8da83a6b0e] [1m[35m (1.0ms)[0m [1m[35mBEGIN[0m
2019-09-05T21:31:26.096930+00:00 app[web.1]: D, [2019-09-05T21:31:26.096826 #14] DEBUG -- : [63bbddba-107e-47b5-a0ee-ca8da83a6b0e] [1m[36mUser Create (1.8ms)[0m [1m[32mINSERT INTO "users" ("name", "email", "note", "date_and_time", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["name", "Michael"], ["email", "example_email#example.com"], ["note", "Check"], ["date_and_time", "2019-09-05 22:00:00"], ["created_at", "2019-09-05 21:31:26.092480"], ["updated_at", "2019-09-05 21:31:26.092480"]]
2019-09-05T21:31:26.099330+00:00 app[web.1]: D, [2019-09-05T21:31:26.099250 #14] DEBUG -- : [63bbddba-107e-47b5-a0ee-ca8da83a6b0e] [1m[35m (2.0ms)[0m [1m[35mCOMMIT[0m
2019-09-05T21:31:26.102570+00:00 app[web.1]: I, [2019-09-05T21:31:26.102493 #14] INFO -- : [63bbddba-107e-47b5-a0ee-ca8da83a6b0e] Completed 500 Internal Server Error in 16ms (ActiveRecord: 4.8ms)
2019-09-05T21:31:26.103205+00:00 app[web.1]: F, [2019-09-05T21:31:26.103127 #14] FATAL -- : [63bbddba-107e-47b5-a0ee-ca8da83a6b0e]
2019-09-05T21:31:26.103267+00:00 app[web.1]: F, [2019-09-05T21:31:26.103206 #14] FATAL -- : [63bbddba-107e-47b5-a0ee-ca8da83a6b0e] Redis::CannotConnectError (Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED)):
2019-09-05T21:31:26.103318+00:00 app[web.1]: F, [2019-09-05T21:31:26.103263 #14] FATAL -- : [63bbddba-107e-47b5-a0ee-ca8da83a6b0e]
2019-09-05T21:31:26.103376+00:00 app[web.1]: F, [2019-09-05T21:31:26.103323 #14] FATAL -- : [63bbddba-107e-47b5-a0ee-ca8da83a6b0e] app/controllers/users_controller.rb:25:in block in create'
2019-09-05T21:31:26.103377+00:00 app[web.1]: [63bbddba-107e-47b5-a0ee-ca8da83a6b0e] app/controllers/users_controller.rb:23:increate'
Heroku doesn't support your case, you must use s3 as they mentioned in their doc https://devcenter.heroku.com/articles/active-storage-on-heroku here, else you will end up missing image after the instance restarted or after you deploy new version.
The files will go away when the app is deployed, or when it is automatically restarted (once every 24 hours)
There's no other better option, you can either:
Keep using heroku for the server and s3 for file storage (No charge for free tier, just keep a reminder to shut it down sometimes later)
Move all to AWS, so you don't have to use 2 providers.
If you are not actually using Active Storage, look in Config > Environments > production.rb and you should find the following lines;
# Store uploaded files on the local file system (see config/storage.yml for options)
config.active_storage.service = :local
Just comment out config.active_storage.service = :local to make it look like this:
# Store uploaded files on the local file system (see config/storage.yml for options)
# config.active_storage.service = :local
Or, remove both lines entirely.
Then, it should work fine on Heroku.
I am having an issue with my web application opening after being pushed to Heroku from Ruby on Rails. When I test out my application within the cloud9 ide it opens and works perfectly. However when I try to open it after merging all the branches to the master and pushing both the master to git and to Heroku I get this:
https://limitless-fortress-32820.herokuapp.com/
I am unsure how to fix this. Any advice?
This is what the logs say:
2017-03-11T02:43:48.982178+00:00 app[web.1]: D, [2017-03-11T02:43:48.982112 #4] DEBUG -- : [9828508f-52fc-489a-9bda-d680b05f1c28] Plan Load (0.7ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2017-03-11T02:43:48.983225+00:00 app[web.1]: D, [2017-03-11T02:43:48.983167 #4] DEBUG -- : [9828508f-52fc-489a-9bda-d680b05f1c28] Plan Load (0.6ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]]
2017-03-11T02:43:48.983770+00:00 app[web.1]: I, [2017-03-11T02:43:48.983713 #4] INFO -- : [9828508f-52fc-489a-9bda-d680b05f1c28] Completed 404 Not Found in 3ms (ActiveRecord: 1.4ms)
2017-03-11T02:43:48.984196+00:00 app[web.1]: F, [2017-03-11T02:43:48.984142 #4] FATAL -- : [9828508f-52fc-489a-9bda-d680b05f1c28]
2017-03-11T02:43:48.984248+00:00 app[web.1]: F, [2017-03-11T02:43:48.984196 #4] FATAL -- : [9828508f-52fc-489a-9bda-d680b05f1c28] ActiveRecord::RecordNotFound (Couldn't find Plan with 'id'=3):
2017-03-11T02:43:48.984296+00:00 app[web.1]: F, [2017-03-11T02:43:48.984249 #4] FATAL -- : [9828508f-52fc-489a-9bda-d680b05f1c28]
2017-03-11T02:43:48.984347+00:00 app[web.1]: F, [2017-03-11T02:43:48.984296 #4] FATAL -- : [9828508f-52fc-489a-9bda-d680b05f1c28] app/controllers/pages_controller.rb:5:in `home'
2017-03-11T03:20:33.758477+00:00 heroku[web.1]: Idling
2017-03-11T03:20:33.759144+00:00 heroku[web.1]: State changed from up to down
2017-03-11T03:20:34.554844+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-03-11T03:20:34.566891+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2017-03-11T03:20:34.566983+00:00 app[web.1]: === puma shutdown: 2017-03-11 03:20:34 +0000 ===
2017-03-11T03:20:34.566987+00:00 app[web.1]: - Goodbye!
2017-03-11T03:20:34.567392+00:00 app[web.1]: Exiting
2017-03-11T03:20:34.775834+00:00 heroku[web.1]: Process exited with status 0
2017-03-11T05:25:57.075991+00:00 heroku[web.1]: Unidling
2017-03-11T05:25:57.076291+00:00 heroku[web.1]: State changed from down to starting
2017-03-11T05:26:01.138390+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 56896 -e production`
2017-03-11T05:26:06.849508+00:00 app[web.1]: => Booting Puma
2017-03-11T05:26:06.849544+00:00 app[web.1]: => Rails 5.0.0 application starting in production on http://0.0.0.0:56896
2017-03-11T05:26:06.849552+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-03-11T05:26:07.935302+00:00 app[web.1]: Puma starting in single mode...
2017-03-11T05:26:07.935323+00:00 app[web.1]: * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl
2017-03-11T05:26:07.935324+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-03-11T05:26:07.935325+00:00 app[web.1]: * Environment: production
2017-03-11T05:26:07.935466+00:00 app[web.1]: * Listening on tcp://0.0.0.0:56896
2017-03-11T05:26:07.935709+00:00 app[web.1]: Use Ctrl-C to stop
2017-03-11T05:26:08.316445+00:00 heroku[web.1]: State changed from starting to up
2017-03-11T05:26:11.211047+00:00 app[web.1]: I, [2017-03-11T05:26:11.210942 #4] INFO -- : [d795b023-4103-41a2-8825-ecb50be24fdd] Started HEAD "/" for 184.72.76.14 at 2017-03-11 05:26:11 +0000
2017-03-11T05:26:11.214433+00:00 app[web.1]: I, [2017-03-11T05:26:11.214374 #4] INFO -- : [d795b023-4103-41a2-8825-ecb50be24fdd] Processing by PagesController#home as HTML
2017-03-11T05:26:11.243975+00:00 app[web.1]: D, [2017-03-11T05:26:11.243829 #4] DEBUG -- : [d795b023-4103-41a2-8825-ecb50be24fdd] Plan Load (0.9ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2017-03-11T05:26:11.257064+00:00 app[web.1]: D, [2017-03-11T05:26:11.256920 #4] DEBUG -- : [d795b023-4103-41a2-8825-ecb50be24fdd] Plan Load (0.7ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]]
2017-03-11T05:26:11.257752+00:00 app[web.1]: I, [2017-03-11T05:26:11.257692 #4] INFO -- : [d795b023-4103-41a2-8825-ecb50be24fdd] Completed 404 Not Found in 43ms (ActiveRecord: 7.9ms)
2017-03-11T05:26:11.258611+00:00 app[web.1]: F, [2017-03-11T05:26:11.258542 #4] FATAL -- : [d795b023-4103-41a2-8825-ecb50be24fdd]
2017-03-11T05:26:11.258689+00:00 app[web.1]: F, [2017-03-11T05:26:11.258627 #4] FATAL -- : [d795b023-4103-41a2-8825-ecb50be24fdd] ActiveRecord::RecordNotFound (Couldn't find Plan with 'id'=3):
2017-03-11T05:26:11.258744+00:00 app[web.1]: F, [2017-03-11T05:26:11.258692 #4] FATAL -- : [d795b023-4103-41a2-8825-ecb50be24fdd]
2017-03-11T05:26:11.258855+00:00 app[web.1]: F, [2017-03-11T05:26:11.258746 #4] FATAL -- : [d795b023-4103-41a2-8825-ecb50be24fdd] app/controllers/pages_controller.rb:5:in `home'
2017-03-11T05:26:11.258728+00:00 heroku[router]: at=info method=HEAD path="/" host=limitless-fortress-32820.herokuapp.com request_id=d795b023-4103-41a2-8825-ecb50be24fdd fwd="184.72.76.14" dyno=web.1 connect=12ms service=118ms status=404 bytes=180 protocol=https
2017-03-11T05:58:12.552944+00:00 heroku[web.1]: Idling
2017-03-11T05:58:12.553609+00:00 heroku[web.1]: State changed from up to down
2017-03-11T05:58:13.333628+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-03-11T05:58:13.379474+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2017-03-11T05:58:13.379914+00:00 app[web.1]: === puma shutdown: 2017-03-11 05:58:13 +0000 ===
2017-03-11T05:58:13.379919+00:00 app[web.1]: - Goodbye!
2017-03-11T05:58:13.380079+00:00 app[web.1]: Exiting
2017-03-11T05:58:13.710764+00:00 heroku[web.1]: Process exited with status 0
2017-03-11T07:27:27.616986+00:00 heroku[web.1]: Unidling
2017-03-11T07:27:27.617784+00:00 heroku[web.1]: State changed from down to starting
2017-03-11T07:27:30.484604+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 53485 -e production`
2017-03-11T07:27:34.063443+00:00 app[web.1]: => Booting Puma
2017-03-11T07:27:34.063485+00:00 app[web.1]: => Rails 5.0.0 application starting in production on http://0.0.0.0:53485
2017-03-11T07:27:34.063487+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-03-11T07:27:34.745431+00:00 app[web.1]: Puma starting in single mode...
2017-03-11T07:27:34.745451+00:00 app[web.1]: * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl
2017-03-11T07:27:34.745452+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-03-11T07:27:34.745453+00:00 app[web.1]: * Environment: production
2017-03-11T07:27:34.745551+00:00 app[web.1]: * Listening on tcp://0.0.0.0:53485
2017-03-11T07:27:34.745760+00:00 app[web.1]: Use Ctrl-C to stop
2017-03-11T07:27:35.323498+00:00 heroku[web.1]: State changed from starting to up
2017-03-11T07:27:36.716062+00:00 heroku[router]: at=info method=GET path="/" host=limitless-fortress-32820.herokuapp.com request_id=3034176c-dd58-4af0-8f70-745f440273db fwd="125.62.127.212" dyno=web.1 connect=0ms service=67ms status=404 bytes=1744 protocol=https
2017-03-11T07:27:36.683610+00:00 app[web.1]: I, [2017-03-11T07:27:36.683527 #4] INFO -- : [3034176c-dd58-4af0-8f70-745f440273db] Started GET "/" for 125.62.127.212 at 2017-03-11 07:27:36 +0000
2017-03-11T07:27:36.686611+00:00 app[web.1]: I, [2017-03-11T07:27:36.686528 #4] INFO -- : [3034176c-dd58-4af0-8f70-745f440273db] Processing by PagesController#home as HTML
2017-03-11T07:27:36.705959+00:00 app[web.1]: D, [2017-03-11T07:27:36.705867 #4] DEBUG -- : [3034176c-dd58-4af0-8f70-745f440273db] Plan Load (0.6ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2017-03-11T07:27:36.715238+00:00 app[web.1]: D, [2017-03-11T07:27:36.715149 #4] DEBUG -- : [3034176c-dd58-4af0-8f70-745f440273db] Plan Load (2.1ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]]
2017-03-11T07:27:36.715738+00:00 app[web.1]: I, [2017-03-11T07:27:36.715679 #4] INFO -- : [3034176c-dd58-4af0-8f70-745f440273db] Completed 404 Not Found in 29ms (ActiveRecord: 8.8ms)
2017-03-11T07:27:36.716195+00:00 app[web.1]: F, [2017-03-11T07:27:36.716134 #4] FATAL -- : [3034176c-dd58-4af0-8f70-745f440273db]
2017-03-11T07:27:36.716273+00:00 app[web.1]: F, [2017-03-11T07:27:36.716193 #4] FATAL -- : [3034176c-dd58-4af0-8f70-745f440273db] ActiveRecord::RecordNotFound (Couldn't find Plan with 'id'=3):
2017-03-11T07:27:36.716324+00:00 app[web.1]: F, [2017-03-11T07:27:36.716271 #4] FATAL -- : [3034176c-dd58-4af0-8f70-745f440273db]
2017-03-11T07:27:36.716375+00:00 app[web.1]: F, [2017-03-11T07:27:36.716321 #4] FATAL -- : [3034176c-dd58-4af0-8f70-745f440273db] app/controllers/pages_controller.rb:5:in `home'
2017-03-11T07:27:37.337320+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=limitless-fortress-32820.herokuapp.com request_id=20bb1588-0933-4517-9605-0fdac9f274af fwd="125.62.127.212" dyno=web.1 connect=0ms service=1ms status=200 bytes=143 protocol=https
2017-03-11T08:01:45.234016+00:00 heroku[web.1]: Idling
2017-03-11T08:01:45.234777+00:00 heroku[web.1]: State changed from up to down
2017-03-11T08:01:46.059828+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-03-11T08:01:46.113060+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2017-03-11T08:01:46.113197+00:00 app[web.1]: === puma shutdown: 2017-03-11 08:01:46 +0000 ===
2017-03-11T08:01:46.113203+00:00 app[web.1]: - Goodbye!
2017-03-11T08:01:46.113318+00:00 app[web.1]: Exiting
2017-03-11T08:01:46.472377+00:00 heroku[web.1]: Process exited with status 0
2017-03-11T16:26:53.013220+00:00 heroku[web.1]: Unidling
2017-03-11T16:26:53.013532+00:00 heroku[web.1]: State changed from down to starting
2017-03-11T16:26:55.743205+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 42518 -e production`
2017-03-11T16:26:59.184085+00:00 app[web.1]: => Booting Puma
2017-03-11T16:26:59.184112+00:00 app[web.1]: => Rails 5.0.0 application starting in production on http://0.0.0.0:42518
2017-03-11T16:26:59.184113+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-03-11T16:26:59.813953+00:00 app[web.1]: Puma starting in single mode...
2017-03-11T16:26:59.813978+00:00 app[web.1]: * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl
2017-03-11T16:26:59.814009+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-03-11T16:26:59.814025+00:00 app[web.1]: * Environment: production
2017-03-11T16:26:59.814139+00:00 app[web.1]: * Listening on tcp://0.0.0.0:42518
2017-03-11T16:26:59.814338+00:00 app[web.1]: Use Ctrl-C to stop
2017-03-11T16:27:00.213490+00:00 heroku[web.1]: State changed from starting to up
2017-03-11T16:27:01.161259+00:00 heroku[router]: at=info method=GET path="/" host=limitless-fortress-32820.herokuapp.com request_id=0394b2a7-1f84-42a8-9f38-5093385535b9 fwd="68.113.158.107,66.249.88.31" dyno=web.1 connect=1ms service=77ms status=404 bytes=1744 protocol=https
2017-03-11T16:27:01.104510+00:00 app[web.1]: I, [2017-03-11T16:27:01.104407 #4] INFO -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] Started GET "/" for 66.249.88.31 at 2017-03-11 16:27:01 +0000
2017-03-11T16:27:01.107677+00:00 app[web.1]: I, [2017-03-11T16:27:01.107612 #4] INFO -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] Processing by PagesController#home as HTML
2017-03-11T16:27:01.138947+00:00 app[web.1]: D, [2017-03-11T16:27:01.138843 #4] DEBUG -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] Plan Load (2.7ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2017-03-11T16:27:01.144670+00:00 app[web.1]: D, [2017-03-11T16:27:01.144594 #4] DEBUG -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] Plan Load (1.0ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]]
2017-03-11T16:27:01.145093+00:00 app[web.1]: I, [2017-03-11T16:27:01.145032 #4] INFO -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] Completed 404 Not Found in 37ms (ActiveRecord: 16.8ms)
2017-03-11T16:27:01.145493+00:00 app[web.1]: F, [2017-03-11T16:27:01.145437 #4] FATAL -- : [0394b2a7-1f84-42a8-9f38-5093385535b9]
2017-03-11T16:27:01.145518+00:00 app[web.1]: F, [2017-03-11T16:27:01.145485 #4] FATAL -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] ActiveRecord::RecordNotFound (Couldn't find Plan with 'id'=3):
2017-03-11T16:27:01.145558+00:00 app[web.1]: F, [2017-03-11T16:27:01.145518 #4] FATAL -- : [0394b2a7-1f84-42a8-9f38-5093385535b9]
2017-03-11T16:27:01.145592+00:00 app[web.1]: F, [2017-03-11T16:27:01.145552 #4] FATAL -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] app/controllers/pages_controller.rb:5:in `home'
I am unfamiliar with deciphering what this means. This is my first application.
Have you run all the migrations and set up the environment variables? Enable Papertrail on your site. Then you can view the logs which should show what the error is.
The best way to see whats happening here is by reading the logs. You can do this by running:
heroku logs -a limitless-fortress-32820 (or whatever you named your app)
You would do this in your commandline and this assumes that you have the heroku cli tools installed.
Check for the error the log is displaying and go from there. It could be a procfile, environmental variable issue, migration issue or any number of things.
To check heroku logs in real time:
heroku logs -t -a limitless-fortress-32820
Check following to resolve issues:
1. Have you used PG database?
2. Is all Migration file run?
I was trying to test sending an e-mail from a contact form of a Rails app based at an Heroku server and I got an error saying:
We're sorry, but something went wrong. If you are the application owner check the logs for more information.
My intention was to learn how to integrate a mail server service into my Heroku account. For that, the addon used was MailGun. I even created a MailGun account with my personal e-mail to be able to check if I'm getting the e-mails or not.
After deploying the code from the Cloud9 environment to Heroku servers with the success, the only change I made in my Ruby code was the following stuff:
config/environment.rb
ActionMailer::Base.smtp_settings = {
:port => ENV['MAILGUN_SMTP_PORT'],
:address => ENV['MAILGUN_SMTP_SERVER'],
:user_name => ENV['MAILGUN_SMTP_LOGIN'],
:password => ENV['MAILGUN_SMTP_PASSWORD'],
:domain => 'blahblahblah.herokuapp.com',
:authentication => :plain,
}
ActionMailer::Base.delivery_method = :smtp
What's the problem? Any tip for a solution?
Updated Requested Info (Heroku Logs - I can't update all the logs due to restriction of characters in StackOverflow body):
iamsamuel:~/workspace/saasapp (master) $ heroku logs
2017-02-24T20:18:19.316716+00:00 app[web.1]: Content-Type: text/html;
2017-02-24T20:18:19.316717+00:00 app[web.1]: charset=UTF-8
2017-02-24T20:18:19.316718+00:00 app[web.1]: Content-Transfer-Encoding: 7bit
2017-02-24T20:18:19.316718+00:00 app[web.1]:
2017-02-24T20:18:19.316719+00:00 app[web.1]: <!DOCTYPE html>
2017-02-24T20:18:19.316719+00:00 app[web.1]: <html>
2017-02-24T20:18:19.316720+00:00 app[web.1]: <head>
2017-02-24T20:18:19.316721+00:00 app[web.1]: </head>
2017-02-24T20:18:19.316721+00:00 app[web.1]: <body>
2017-02-24T20:18:19.316722+00:00 app[web.1]: <p>
2017-02-24T20:18:19.316723+00:00 app[web.1]: You have received a message from the site's contact form, from Sam, smlmrr#outlook.com.
2017-02-24T20:18:19.316724+00:00 app[web.1]: </p>
2017-02-24T20:18:19.316724+00:00 app[web.1]: <p>
2017-02-24T20:18:19.316725+00:00 app[web.1]:
2017-02-24T20:18:19.316725+00:00 app[web.1]: </p>
2017-02-24T20:18:19.316726+00:00 app[web.1]: </body>
2017-02-24T20:18:19.316726+00:00 app[web.1]: </html>
2017-02-24T20:18:19.316886+00:00 app[web.1]: I, [2017-02-24T20:18:19.316838 #4] INFO -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] Completed 500 Internal Server Error in 1166ms (ActiveRecord: 4.1ms)
2017-02-24T20:18:19.317316+00:00 app[web.1]: F, [2017-02-24T20:18:19.317273 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c]
2017-02-24T20:18:19.317357+00:00 app[web.1]: F, [2017-02-24T20:18:19.317318 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] Net::SMTPFatalError (554 Please activate your Mailgun account. Check your inbox or log in to your control panel to resend the activation email.
2017-02-24T20:18:19.317358+00:00 app[web.1]: ):
2017-02-24T20:18:19.317396+00:00 app[web.1]: F, [2017-02-24T20:18:19.317355 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c]
2017-02-24T20:18:19.317435+00:00 app[web.1]: F, [2017-02-24T20:18:19.317396 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] app/controllers/contacts_controller.rb:15:in `create'
2017-02-24T20:18:19.520898+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-forest-28304.herokuapp.com request_id=62153ff0-bef7-4e44-958b-447fb18e7c23 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:53:16.169251+00:00 heroku[web.1]: Idling
2017-02-24T20:53:16.169901+00:00 heroku[web.1]: State changed from up to down
2017-02-24T20:53:17.034264+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-02-24T20:53:17.078764+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2017-02-24T20:53:17.078952+00:00 app[web.1]: === puma shutdown: 2017-02-24 20:53:17 +0000 ===
2017-02-24T20:53:17.078957+00:00 app[web.1]: - Goodbye!
2017-02-24T20:53:17.079100+00:00 app[web.1]: Exiting
2017-02-24T20:53:17.347515+00:00 heroku[web.1]: Process exited with status 0
2017-02-24T20:57:24.680979+00:00 heroku[web.1]: Unidling
2017-02-24T20:57:24.681258+00:00 heroku[web.1]: State changed from down to starting
2017-02-24T20:57:27.221989+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 44473 -e production`
2017-02-24T20:57:30.299354+00:00 app[web.1]: => Booting Puma
2017-02-24T20:57:30.299447+00:00 app[web.1]: => Rails 5.0.0 application starting in production on http://0.0.0.0:44473
2017-02-24T20:57:30.299502+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-02-24T20:57:31.229688+00:00 app[web.1]: Puma starting in single mode...
2017-02-24T20:57:31.229714+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-02-24T20:57:31.229713+00:00 app[web.1]: * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl
2017-02-24T20:57:31.229716+00:00 app[web.1]: * Environment: production
2017-02-24T20:57:31.229813+00:00 app[web.1]: * Listening on tcp://0.0.0.0:44473
2017-02-24T20:57:31.230029+00:00 app[web.1]: Use Ctrl-C to stop
2017-02-24T20:57:31.421917+00:00 heroku[web.1]: State changed from starting to up
2017-02-24T20:57:32.788592+00:00 heroku[router]: at=info method=GET path="/" host=infinite-forest-28304.herokuapp.com request_id=dedd394a-498a-464d-a669-ed19fa2fd418 fwd="188.83.235.112" dyno=web.1 connect=0ms service=58ms status=200 bytes=2753
2017-02-24T20:57:32.737531+00:00 app[web.1]: I, [2017-02-24T20:57:32.737424 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Started GET "/" for 188.83.235.112 at 2017-02-24 20:57:32 +0000
2017-02-24T20:57:32.740219+00:00 app[web.1]: I, [2017-02-24T20:57:32.740152 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Processing by PagesController#home as HTML
2017-02-24T20:57:32.752357+00:00 app[web.1]: I, [2017-02-24T20:57:32.752273 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Rendering pages/home.html.erb within layouts/application
2017-02-24T20:57:32.753153+00:00 app[web.1]: I, [2017-02-24T20:57:32.753082 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Rendered pages/home.html.erb within layouts/application (0.6ms)
2017-02-24T20:57:32.759595+00:00 app[web.1]: I, [2017-02-24T20:57:32.759524 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Completed 200 OK in 19ms (Views: 8.6ms | ActiveRecord: 0.0ms)
2017-02-24T20:57:32.929609+00:00 heroku[router]: at=info method=GET path="/assets/application-95163fa38446d1bb6139f870d5fb932af7fa47b347b8951923c32a4565386aa6.js" host=infinite-forest-28304.herokuapp.com request_id=80d55a95-cbe8-4982-a571-bc8850567a87 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:32.928158+00:00 heroku[router]: at=info method=GET path="/assets/application-5ed627eba0abe94ba4e2c255c2298f55d9bca9b4ea45ded59ba1705edc5385d0.css" host=infinite-forest-28304.herokuapp.com request_id=a9c456f3-e7cd-4d6a-865f-2c8f5efbdaa7 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:33.143930+00:00 heroku[router]: at=info method=GET path="/assets/font-awesome/fontawesome-webfont-2932abf996373e87fbf2e950876b1962f1b57db954a1643ea68831d9fbb74da4.woff2?v=4.6.2" host=infinite-forest-28304.herokuapp.com request_id=90d78563-eaa6-4f24-a054-5c89beada59c fwd="188.83.235.112" dyno=web.1 connect=3ms service=1ms status=304 bytes=48
2017-02-24T20:57:33.402193+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-forest-28304.herokuapp.com request_id=7c20311c-bd5a-46c3-a9d5-c6266c1f9331 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:50.706814+00:00 heroku[router]: at=info method=GET path="/contact-us" host=infinite-forest-28304.herokuapp.com request_id=0ec752b1-0d75-42dd-83f6-ecd127086bfb fwd="188.83.235.112" dyno=web.1 connect=0ms service=35ms status=200 bytes=4317
2017-02-24T20:57:50.651067+00:00 app[web.1]: I, [2017-02-24T20:57:50.650984 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Started GET "/contact-us" for 188.83.235.112 at 2017-02-24 20:57:50 +0000
2017-02-24T20:57:50.652579+00:00 app[web.1]: I, [2017-02-24T20:57:50.652518 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Processing by ContactsController#new as HTML
2017-02-24T20:57:50.669618+00:00 app[web.1]: I, [2017-02-24T20:57:50.669536 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Rendering contacts/new.html.erb within layouts/application
2017-02-24T20:57:50.681558+00:00 app[web.1]: I, [2017-02-24T20:57:50.681481 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Rendered contacts/new.html.erb within layouts/application (11.8ms)
2017-02-24T20:57:50.682909+00:00 app[web.1]: I, [2017-02-24T20:57:50.682846 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Completed 200 OK in 30ms (Views: 14.0ms | ActiveRecord: 7.5ms)
2017-02-24T20:59:14.426470+00:00 app[web.1]: I, [2017-02-24T20:59:14.426395 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Started POST "/contacts" for 188.83.235.112 at 2017-02-24 20:59:14 +0000
2017-02-24T20:59:14.427281+00:00 app[web.1]: I, [2017-02-24T20:59:14.427232 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Processing by ContactsController#create as HTML
2017-02-24T20:59:14.427366+00:00 app[web.1]: I, [2017-02-24T20:59:14.427324 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Parameters: {"utf8"=>"✓", "authenticity_token"=>"MgrtXM/8aUAYPnJ2ph4eIbsqMbLR/xXMZabcKmKh4myMlp0MdLJ2dCHnh7KshXSCqAsIzGQr0SdebpJw1v0QHw==", "contact"=>{"name"=>"Jesse Pinkman", "email"=>"jp#example.com", "comments"=>"Yo Beach!"}, "commit"=>"Submit"}
2017-02-24T20:59:14.429694+00:00 app[web.1]: D, [2017-02-24T20:59:14.429641 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] (0.9ms) BEGIN
2017-02-24T20:59:14.434537+00:00 app[web.1]: D, [2017-02-24T20:59:14.434485 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] SQL (1.3ms) INSERT INTO "contacts" ("name", "email", "comments", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Jesse Pinkman"], ["email", "jp#example.com"], ["comments", "Yo Beach!"], ["created_at", 2017-02-24 20:59:14 UTC], ["updated_at", 2017-02-24 20:59:14 UTC]]
2017-02-24T20:59:14.436712+00:00 app[web.1]: D, [2017-02-24T20:59:14.436665 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] (1.9ms) COMMIT
2017-02-24T20:59:14.441776+00:00 app[web.1]: I, [2017-02-24T20:59:14.441724 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Rendering contact_mailer/contact_email.html.erb
2017-02-24T20:59:14.442284+00:00 app[web.1]: I, [2017-02-24T20:59:14.442237 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Rendered contact_mailer/contact_email.html.erb (0.4ms)
2017-02-24T20:59:14.622612+00:00 app[web.1]: D, [2017-02-24T20:59:14.622518 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] ContactMailer#contact_email: processed outbound mail in 184.5ms
2017-02-24T20:59:14.749027+00:00 heroku[router]: at=info method=POST path="/contacts" host=infinite-forest-28304.herokuapp.com request_id=606794a4-3f9b-417c-b3ca-72af4d8bafb6 fwd="188.83.235.112" dyno=web.1 connect=0ms service=304ms status=500 bytes=1669
2017-02-24T20:59:14.722589+00:00 app[web.1]: I, [2017-02-24T20:59:14.722491 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Sent mail to samuelslmoreira#hotmail.com (99.8ms)
2017-02-24T20:59:14.722632+00:00 app[web.1]: D, [2017-02-24T20:59:14.722588 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Date: Fri, 24 Feb 2017 20:59:14 +0000
2017-02-24T20:59:14.722632+00:00 app[web.1]: From: jp#example.com
2017-02-24T20:59:14.722633+00:00 app[web.1]: To: samuelslmoreira#hotmail.com
2017-02-24T20:59:14.722633+00:00 app[web.1]: Message-ID: <58b09ea298a14_43fc0c75eb9c0103ae#71798652-2827-4935-9282-6b3ae7c47b44.mail>
2017-02-24T20:59:14.722634+00:00 app[web.1]: Subject: Contact Form Message
2017-02-24T20:59:14.722634+00:00 app[web.1]: Mime-Version: 1.0
2017-02-24T20:59:14.722635+00:00 app[web.1]: Content-Type: text/html;
2017-02-24T20:59:14.722635+00:00 app[web.1]: charset=UTF-8
2017-02-24T20:59:14.722635+00:00 app[web.1]: Content-Transfer-Encoding: 7bit
2017-02-24T20:59:14.722636+00:00 app[web.1]:
2017-02-24T20:59:14.722636+00:00 app[web.1]: <!DOCTYPE html>
2017-02-24T20:59:14.722637+00:00 app[web.1]: <html>
2017-02-24T20:59:14.722637+00:00 app[web.1]: <head>
2017-02-24T20:59:14.722637+00:00 app[web.1]: </head>
2017-02-24T20:59:14.722638+00:00 app[web.1]: <body>
2017-02-24T20:59:14.722638+00:00 app[web.1]: <p>
2017-02-24T20:59:14.722638+00:00 app[web.1]: You have received a message from the site's contact form, from Jesse Pinkman, jp#example.com.
2017-02-24T20:59:14.722639+00:00 app[web.1]: </p>
2017-02-24T20:59:14.722639+00:00 app[web.1]: <p>
2017-02-24T20:59:14.722639+00:00 app[web.1]:
2017-02-24T20:59:14.722640+00:00 app[web.1]: </p>
2017-02-24T20:59:14.722640+00:00 app[web.1]: </body>
2017-02-24T20:59:14.722640+00:00 app[web.1]: </html>
2017-02-24T20:59:14.722825+00:00 app[web.1]: I, [2017-02-24T20:59:14.722779 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Completed 500 Internal Server Error in 295ms (ActiveRecord: 4.1ms)
2017-02-24T20:59:14.723286+00:00 app[web.1]: F, [2017-02-24T20:59:14.723242 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]
2017-02-24T20:59:14.723324+00:00 app[web.1]: F, [2017-02-24T20:59:14.723287 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Net::SMTPFatalError (554 Please activate your Mailgun account. Check your inbox or log in to your control panel to resend the activation email.
2017-02-24T20:59:14.723325+00:00 app[web.1]: ):
2017-02-24T20:59:14.723357+00:00 app[web.1]: F, [2017-02-24T20:59:14.723324 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]
2017-02-24T20:59:14.723390+00:00 app[web.1]: F, [2017-02-24T20:59:14.723357 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] app/controllers/contacts_controller.rb:15:in `create'
iamsamuel:~/workspace/saasapp (master) $ clear
iamsamuel:~/workspace/saasapp (master) $ clear
iamsamuel:~/workspace/saasapp (master) $ heroku logs
2017-02-24T20:18:19.316723+00:00 app[web.1]: You have received a message from the site's contact form, from Sam, smlmrr#outlook.com.
2017-02-24T20:18:19.316724+00:00 app[web.1]: </p>
2017-02-24T20:18:19.316724+00:00 app[web.1]: <p>
2017-02-24T20:18:19.316725+00:00 app[web.1]:
2017-02-24T20:18:19.316725+00:00 app[web.1]: </p>
2017-02-24T20:18:19.316726+00:00 app[web.1]: </body>
2017-02-24T20:18:19.316726+00:00 app[web.1]: </html>
2017-02-24T20:18:19.316886+00:00 app[web.1]: I, [2017-02-24T20:18:19.316838 #4] INFO -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] Completed 500 Internal Server Error in 1166ms (ActiveRecord: 4.1ms)
2017-02-24T20:18:19.317316+00:00 app[web.1]: F, [2017-02-24T20:18:19.317273 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c]
2017-02-24T20:18:19.317357+00:00 app[web.1]: F, [2017-02-24T20:18:19.317318 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] Net::SMTPFatalError (554 Please activate your Mailgun account. Check your inbox or log in to your control panel to resend the activation email.
2017-02-24T20:18:19.317358+00:00 app[web.1]: ):
2017-02-24T20:18:19.317396+00:00 app[web.1]: F, [2017-02-24T20:18:19.317355 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c]
2017-02-24T20:18:19.317435+00:00 app[web.1]: F, [2017-02-24T20:18:19.317396 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] app/controllers/contacts_controller.rb:15:in `create'
2017-02-24T20:18:19.520898+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-forest-28304.herokuapp.com request_id=62153ff0-bef7-4e44-958b-447fb18e7c23 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:53:16.169251+00:00 heroku[web.1]: Idling
2017-02-24T20:53:16.169901+00:00 heroku[web.1]: State changed from up to down
2017-02-24T20:53:17.034264+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-02-24T20:53:17.078764+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2017-02-24T20:53:17.078952+00:00 app[web.1]: === puma shutdown: 2017-02-24 20:53:17 +0000 ===
2017-02-24T20:53:17.078957+00:00 app[web.1]: - Goodbye!
2017-02-24T20:53:17.079100+00:00 app[web.1]: Exiting
2017-02-24T20:53:17.347515+00:00 heroku[web.1]: Process exited with status 0
2017-02-24T20:57:24.680979+00:00 heroku[web.1]: Unidling
2017-02-24T20:57:24.681258+00:00 heroku[web.1]: State changed from down to starting
2017-02-24T20:57:27.221989+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 44473 -e production`
2017-02-24T20:57:30.299354+00:00 app[web.1]: => Booting Puma
2017-02-24T20:57:30.299447+00:00 app[web.1]: => Rails 5.0.0 application starting in production on http://0.0.0.0:44473
2017-02-24T20:57:30.299502+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-02-24T20:57:31.229688+00:00 app[web.1]: Puma starting in single mode...
2017-02-24T20:57:31.229714+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-02-24T20:57:31.229713+00:00 app[web.1]: * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl
2017-02-24T20:57:31.229716+00:00 app[web.1]: * Environment: production
2017-02-24T20:57:31.229813+00:00 app[web.1]: * Listening on tcp://0.0.0.0:44473
2017-02-24T20:57:31.230029+00:00 app[web.1]: Use Ctrl-C to stop
2017-02-24T20:57:31.421917+00:00 heroku[web.1]: State changed from starting to up
2017-02-24T20:57:32.788592+00:00 heroku[router]: at=info method=GET path="/" host=infinite-forest-28304.herokuapp.com request_id=dedd394a-498a-464d-a669-ed19fa2fd418 fwd="188.83.235.112" dyno=web.1 connect=0ms service=58ms status=200 bytes=2753
2017-02-24T20:57:32.737531+00:00 app[web.1]: I, [2017-02-24T20:57:32.737424 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Started GET "/" for 188.83.235.112 at 2017-02-24 20:57:32 +0000
2017-02-24T20:57:32.740219+00:00 app[web.1]: I, [2017-02-24T20:57:32.740152 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Processing by PagesController#home as HTML
2017-02-24T20:57:32.752357+00:00 app[web.1]: I, [2017-02-24T20:57:32.752273 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Rendering pages/home.html.erb within layouts/application
2017-02-24T20:57:32.753153+00:00 app[web.1]: I, [2017-02-24T20:57:32.753082 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Rendered pages/home.html.erb within layouts/application (0.6ms)
2017-02-24T20:57:32.759595+00:00 app[web.1]: I, [2017-02-24T20:57:32.759524 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Completed 200 OK in 19ms (Views: 8.6ms | ActiveRecord: 0.0ms)
2017-02-24T20:57:32.929609+00:00 heroku[router]: at=info method=GET path="/assets/application-95163fa38446d1bb6139f870d5fb932af7fa47b347b8951923c32a4565386aa6.js" host=infinite-forest-28304.herokuapp.com request_id=80d55a95-cbe8-4982-a571-bc8850567a87 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:32.928158+00:00 heroku[router]: at=info method=GET path="/assets/application-5ed627eba0abe94ba4e2c255c2298f55d9bca9b4ea45ded59ba1705edc5385d0.css" host=infinite-forest-28304.herokuapp.com request_id=a9c456f3-e7cd-4d6a-865f-2c8f5efbdaa7 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:33.143930+00:00 heroku[router]: at=info method=GET path="/assets/font-awesome/fontawesome-webfont-2932abf996373e87fbf2e950876b1962f1b57db954a1643ea68831d9fbb74da4.woff2?v=4.6.2" host=infinite-forest-28304.herokuapp.com request_id=90d78563-eaa6-4f24-a054-5c89beada59c fwd="188.83.235.112" dyno=web.1 connect=3ms service=1ms status=304 bytes=48
2017-02-24T20:57:33.402193+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-forest-28304.herokuapp.com request_id=7c20311c-bd5a-46c3-a9d5-c6266c1f9331 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:50.706814+00:00 heroku[router]: at=info method=GET path="/contact-us" host=infinite-forest-28304.herokuapp.com request_id=0ec752b1-0d75-42dd-83f6-ecd127086bfb fwd="188.83.235.112" dyno=web.1 connect=0ms service=35ms status=200 bytes=4317
2017-02-24T20:57:50.651067+00:00 app[web.1]: I, [2017-02-24T20:57:50.650984 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Started GET "/contact-us" for 188.83.235.112 at 2017-02-24 20:57:50 +0000
2017-02-24T20:57:50.652579+00:00 app[web.1]: I, [2017-02-24T20:57:50.652518 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Processing by ContactsController#new as HTML
2017-02-24T20:57:50.669618+00:00 app[web.1]: I, [2017-02-24T20:57:50.669536 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Rendering contacts/new.html.erb within layouts/application
2017-02-24T20:57:50.681558+00:00 app[web.1]: I, [2017-02-24T20:57:50.681481 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Rendered contacts/new.html.erb within layouts/application (11.8ms)
2017-02-24T20:57:50.682909+00:00 app[web.1]: I, [2017-02-24T20:57:50.682846 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Completed 200 OK in 30ms (Views: 14.0ms | ActiveRecord: 7.5ms)
2017-02-24T20:59:14.426470+00:00 app[web.1]: I, [2017-02-24T20:59:14.426395 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Started POST "/contacts" for 188.83.235.112 at 2017-02-24 20:59:14 +0000
2017-02-24T20:59:14.427281+00:00 app[web.1]: I, [2017-02-24T20:59:14.427232 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Processing by ContactsController#create as HTML
2017-02-24T20:59:14.427366+00:00 app[web.1]: I, [2017-02-24T20:59:14.427324 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Parameters: {"utf8"=>"✓", "authenticity_token"=>"MgrtXM/8aUAYPnJ2ph4eIbsqMbLR/xXMZabcKmKh4myMlp0MdLJ2dCHnh7KshXSCqAsIzGQr0SdebpJw1v0QHw==", "contact"=>{"name"=>"Jesse Pinkman", "email"=>"jp#example.com", "comments"=>"Yo Beach!"}, "commit"=>"Submit"}
2017-02-24T20:59:14.429694+00:00 app[web.1]: D, [2017-02-24T20:59:14.429641 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] (0.9ms) BEGIN
2017-02-24T20:59:14.434537+00:00 app[web.1]: D, [2017-02-24T20:59:14.434485 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] SQL (1.3ms) INSERT INTO "contacts" ("name", "email", "comments", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Jesse Pinkman"], ["email", "jp#example.com"], ["comments", "Yo Beach!"], ["created_at", 2017-02-24 20:59:14 UTC], ["updated_at", 2017-02-24 20:59:14 UTC]]
2017-02-24T20:59:14.436712+00:00 app[web.1]: D, [2017-02-24T20:59:14.436665 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] (1.9ms) COMMIT
2017-02-24T20:59:14.441776+00:00 app[web.1]: I, [2017-02-24T20:59:14.441724 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Rendering contact_mailer/contact_email.html.erb
2017-02-24T20:59:14.442284+00:00 app[web.1]: I, [2017-02-24T20:59:14.442237 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Rendered contact_mailer/contact_email.html.erb (0.4ms)
2017-02-24T20:59:14.622612+00:00 app[web.1]: D, [2017-02-24T20:59:14.622518 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] ContactMailer#contact_email: processed outbound mail in 184.5ms
2017-02-24T20:59:14.749027+00:00 heroku[router]: at=info method=POST path="/contacts" host=infinite-forest-28304.herokuapp.com request_id=606794a4-3f9b-417c-b3ca-72af4d8bafb6 fwd="188.83.235.112" dyno=web.1 connect=0ms service=304ms status=500 bytes=1669
2017-02-24T20:59:14.722589+00:00 app[web.1]: I, [2017-02-24T20:59:14.722491 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Sent mail to samuelslmoreira#hotmail.com (99.8ms)
2017-02-24T20:59:14.722632+00:00 app[web.1]: D, [2017-02-24T20:59:14.722588 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Date: Fri, 24 Feb 2017 20:59:14 +0000
2017-02-24T20:59:14.722632+00:00 app[web.1]: From: jp#example.com
2017-02-24T20:59:14.722633+00:00 app[web.1]: To: samuelslmoreira#hotmail.com
2017-02-24T20:59:14.722633+00:00 app[web.1]: Message-ID: <58b09ea298a14_43fc0c75eb9c0103ae#71798652-2827-4935-9282-6b3ae7c47b44.mail>
2017-02-24T20:59:14.722634+00:00 app[web.1]: Subject: Contact Form Message
2017-02-24T20:59:14.722634+00:00 app[web.1]: Mime-Version: 1.0
2017-02-24T20:59:14.722635+00:00 app[web.1]: Content-Type: text/html;
2017-02-24T20:59:14.722635+00:00 app[web.1]: charset=UTF-8
2017-02-24T20:59:14.722635+00:00 app[web.1]: Content-Transfer-Encoding: 7bit
2017-02-24T20:59:14.722636+00:00 app[web.1]:
2017-02-24T20:59:14.722636+00:00 app[web.1]: <!DOCTYPE html>
2017-02-24T20:59:14.722637+00:00 app[web.1]: <html>
2017-02-24T20:59:14.722637+00:00 app[web.1]: <head>
2017-02-24T20:59:14.722637+00:00 app[web.1]: </head>
2017-02-24T20:59:14.722638+00:00 app[web.1]: <body>
2017-02-24T20:59:14.722638+00:00 app[web.1]: <p>
2017-02-24T20:59:14.722638+00:00 app[web.1]: You have received a message from the site's contact form, from Jesse Pinkman, jp#example.com.
2017-02-24T20:59:14.722639+00:00 app[web.1]: </p>
2017-02-24T20:59:14.722639+00:00 app[web.1]: <p>
2017-02-24T20:59:14.722639+00:00 app[web.1]:
2017-02-24T20:59:14.722640+00:00 app[web.1]: </p>
2017-02-24T20:59:14.722640+00:00 app[web.1]: </body>
2017-02-24T20:59:14.722640+00:00 app[web.1]: </html>
2017-02-24T20:59:14.722825+00:00 app[web.1]: I, [2017-02-24T20:59:14.722779 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Completed 500 Internal Server Error in 295ms (ActiveRecord: 4.1ms)
2017-02-24T20:59:14.723286+00:00 app[web.1]: F, [2017-02-24T20:59:14.723242 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]
2017-02-24T20:59:14.723324+00:00 app[web.1]: F, [2017-02-24T20:59:14.723287 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Net::SMTPFatalError (554 Please activate your Mailgun account. Check your inbox or log in to your control panel to resend the activation email.
2017-02-24T20:59:14.723325+00:00 app[web.1]: ):
2017-02-24T20:59:14.723357+00:00 app[web.1]: F, [2017-02-24T20:59:14.723324 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]
2017-02-24T20:59:14.723390+00:00 app[web.1]: F, [2017-02-24T20:59:14.723357 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] app/controllers/contacts_controller.rb:15:in `create'
2017-02-24T21:30:27.890702+00:00 heroku[router]: at=info method=GET path="/" host=infinite-forest-28304.herokuapp.com request_id=ef1e2185-e94e-4a90-907e-15dad519fd59 fwd="188.83.235.112" dyno=web.1 connect=1ms service=6ms status=200 bytes=2753
2017-02-24T21:30:27.866291+00:00 app[web.1]: I, [2017-02-24T21:30:27.866202 #4] INFO -- : [ef1e2185-e94e-4a90-907e-15dad519fd59] Started GET "/" for 188.83.235.112 at 2017-02-24 21:30:27 +0000
2017-02-24T21:30:27.867090+00:00 app[web.1]: I, [2017-02-24T21:30:27.867030 #4] INFO -- : [ef1e2185-e94e-4a90-907e-15dad519fd59] Processing by PagesController#home as HTML
2017-02-24T21:30:27.868034+00:00 app[web.1]: I, [2017-02-24T21:30:27.867962 #4] INFO -- : [ef1e2185-e94e-4a90-907e-15dad519fd59] Rendering pages/home.html.erb within layouts/application
2017-02-24T21:30:27.868172+00:00 app[web.1]: I, [2017-02-24T21:30:27.868117 #4] INFO -- : [ef1e2185-e94e-4a90-907e-15dad519fd59] Rendered pages/home.html.erb within layouts/application (0.0ms)
2017-02-24T21:30:27.869109+00:00 app[web.1]: I, [2017-02-24T21:30:27.869058 #4] INFO -- : [ef1e2185-e94e-4a90-907e-15dad519fd59] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
2017-02-24T21:30:28.039850+00:00 heroku[router]: at=info method=GET path="/assets/application-5ed627eba0abe94ba4e2c255c2298f55d9bca9b4ea45ded59ba1705edc5385d0.css" host=infinite-forest-28304.herokuapp.com request_id=f9b48384-ae99-4f9e-b035-6624ef9d2ce6 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T21:30:28.051038+00:00 heroku[router]: at=info method=GET path="/assets/application-95163fa38446d1bb6139f870d5fb932af7fa47b347b8951923c32a4565386aa6.js" host=infinite-forest-28304.herokuapp.com request_id=7b1f62bf-5aca-4ac1-b926-5c3219b3ccac fwd="188.83.235.112" dyno=web.1 connect=1ms service=2ms status=304 bytes=48
2017-02-24T21:30:28.279062+00:00 heroku[router]: at=info method=GET path="/assets/font-awesome/fontawesome-webfont-2932abf996373e87fbf2e950876b1962f1b57db954a1643ea68831d9fbb74da4.woff2?v=4.6.2" host=infinite-forest-28304.herokuapp.com request_id=d1522ce1-c16b-4525-aa55-08c6f45713c8 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T21:30:29.186402+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-forest-28304.herokuapp.com request_id=1cec8754-06b9-4b20-ad32-77976a359e33 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
Read the error message:
Net::SMTPFatalError (554 Please activate your Mailgun account. Check your inbox or log in to your control panel to resend the activation email.
Just activate your account.
Ok. As the logs say and as #GrahamSlick already answered, your mailgun account is not verified. If you claim that the account is verified make sure that the credentials you used in
your config/environment.rb are the correct ones that belong to the verified account and ensure that heroku uses the correct credentials. The logs say that your account is not verified. May be you want to check your settings with mailgun again and see whether they tell you something about having an inactive account. Good luck.
You have to add a domain, verified it then you can send mails from mailgun.
I ran into the exact same issue. I even tried with just CURL to make sure it had nothing to do with rails or heroku. I double checked that my domain was validated.
I ended up opening a support ticket. They got back to me within a few hours and said "now its good to go" and sure enough it works.
So it's either bugs on their end, or they purposefully require manual oversight for some accounts. Not a great first impression, but it's good to see their support responded quickly.
Trying to run elastic search with bonsai and search kick on heroku. it says it is starting but i keep getting a Faraday::ConnectionFailed (Connection refused - connect(2)):
i am almost positive the bonsai URL is being set right.
any idea how to fix? been trying to dive into this but I'm stuck.
user.rb
require 'elasticsearch/model'
class User < ActiveRecord::Base
Elasticsearch::Model.client = Elasticsearch::Client.new url: ENV['BONSAI_URL'], log: true
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
search kick autocomplete: ['name']
gem file
gem 'elasticsearch-model'
gem 'elasticsearch-rails'
gem 'searchkick'
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
gem 'puma', '2.11.1'
gem 'bonsai-elasticsearch-rails', '~> 0.0.4'
end
Full logs
2016-03-12T04:24:03.741737+00:00 heroku[run.2718]: State changed from starting to up
2016-03-12T04:23:16.495563+00:00 app[web.1]: Starting up a new ElasticSearch client with https://xxxxxxx.us-east-1.bonsai.io
2016-03-12T04:23:17.157002+00:00 app[web.1]: [1m[36mUser Load (1.8ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1000[0m
2016-03-12T04:23:17.246641+00:00 app[web.1]: [3] Use Ctrl-C to stop
2016-03-12T04:23:17.250874+00:00 app[web.1]: [3] - Worker 0 (pid: 6) booted, phase: 0
2016-03-12T04:23:17.252056+00:00 app[web.1]: [3] - Worker 1 (pid: 10) booted, phase: 0
2016-03-12T04:23:17.600616+00:00 heroku[web.1]: State changed from starting to up
2016-03-12T04:23:56.953781+00:00 heroku[api]: Starting process with command `bash` by testtest#me.com
2016-03-12T04:24:03.284922+00:00 heroku[run.2718]: Starting process with command `bash`
2016-03-12T04:24:03.741737+00:00 heroku[run.2718]: State changed from starting to up
2016-03-12T04:27:46.959226+00:00 heroku[slug-compiler]: Slug compilation started
2016-03-12T04:23:17.246505+00:00 app[web.1]: [3] * Listening on tcp://0.0.0.0:3243
2016-03-12T04:23:17.246641+00:00 app[web.1]: [3] Use Ctrl-C to stop
2016-03-12T04:23:17.250874+00:00 app[web.1]: [3] - Worker 0 (pid: 6) booted, phase: 0
2016-03-12T04:23:17.600616+00:00 heroku[web.1]: State changed from starting to up
2016-03-12T04:24:03.264844+00:00 heroku[run.2718]: Awaiting client
2016-03-12T04:24:03.284922+00:00 heroku[run.2718]: Starting process with command `bash`
2016-03-12T04:24:03.741737+00:00 heroku[run.2718]: State changed from starting to up
2016-03-12T04:27:46.959233+00:00 heroku[slug-compiler]: Slug compilation failed: unrecognized error 3e521316-8b6b-44bd-b313-e8b62d9f15b1
2016-03-12T04:29:39.843924+00:00 heroku[api]: Deploy 5c0b4bd by testtest#me.com
2016-03-12T04:29:39.843924+00:00 heroku[api]: Release v35 created by testtest#me.com
2016-03-12T04:29:39.972973+00:00 heroku[slug-compiler]: Slug compilation started
2016-03-12T04:29:40.048027+00:00 heroku[web.1]: Restarting
2016-03-12T04:29:40.049299+00:00 heroku[web.1]: State changed from up to starting
2016-03-12T04:29:42.417672+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-03-12T04:29:43.086852+00:00 app[web.1]: [3] - Gracefully shutting down workers...
2016-03-12T04:29:43.176481+00:00 app[web.1]: [3] === puma shutdown: 2016-03-12 04:29:43 +0000 ===
2016-03-12T04:29:43.176488+00:00 app[web.1]: [3] - Goodbye!
2016-03-12T04:29:43.816757+00:00 heroku[web.1]: Process exited with status 0
2016-03-12T04:29:46.716295+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb`
2016-03-12T04:29:49.157324+00:00 app[web.1]: [3] Puma starting in cluster mode...
2016-03-12T04:29:49.157437+00:00 app[web.1]: [3] * Version 2.11.1 (ruby 2.0.0-p648), codename: Intrepid Squirrel
2016-03-12T04:29:49.157472+00:00 app[web.1]: [3] * Environment: production
2016-03-12T04:29:49.157473+00:00 app[web.1]: [3] * Process workers: 2
2016-03-12T04:29:49.157474+00:00 app[web.1]: [3] * Preloading application
2016-03-12T04:29:50.759011+00:00 app[web.1]: Starting up a new ElasticSearch client with https://xxxxxx.us-east-1.bonsai.io
2016-03-12T04:29:51.430834+00:00 app[web.1]: 2016-03-12 04:29:51 +0000: HEAD https://xxxxxx.bonsai.io:443/users [status:200, request:0.017s, query:n/a]
2016-03-12T04:29:51.516765+00:00 app[web.1]: 2016-03-12 04:29:51 +0000: POST https://xxxxxxx.bonsai.io:443/users/user/_bulk [status:200, request:0.016s, query:0.005s]
2016-03-12T04:29:51.516810+00:00 app[web.1]: 2016-03-12 04:29:51 +0000: > {"index":{"_id":1}}
2016-03-12T04:29:51.516811+00:00 app[web.1]: {"id":1,"name":"Example User","email":"example#railstutorial.org","created_at":"2016-03-10T03:09:45.898Z","updated_at":"2016-03-10T03:09:45.898Z","password_digest":"$2a$10$/VQEZljtG.nQRuB20.UG1uSIQjtgk9KfzoXdUL4kGETwbZm/XPOma","remember_digest":null,"admin":true,"activation_digest":"$2a$10$jZpCLV4k2H5nuMCPVuZt7OzlUQjykQ0e7uwADb9AJ0vbrzHDw55La","activated":true,"activated_at":"2016-03-10T03:09:45.691Z","reset_digest":null,"reset_sent_at":null,"location":"New York","discipline":"Actor","slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516812+00:00 app[web.1]: {"index":{"_id":2}}
2016-03-12T04:29:51.516813+00:00 app[web.1]: {"id":2,"name":"test","email":"testtest#me.com","created_at":"2016-03-10T03:13:19.990Z","updated_at":"2016-03-10T03:13:19.990Z","password_digest":"$2a$10$LWDYy6Ek1zR925kLvHHP.uRSnL7hAFOiYcdPkHCdBdiHGjuC8fDTC","remember_digest":null,"admin":false,"activation_digest":"$2a$10$k1jFVFe4lZlI5ktt7RcJx.hxdjwGEQIEnsMnwCnxLS1lpBaXbsFUu","activated":false,"activated_at":null,"reset_digest":null,"reset_sent_at":null,"location":null,"discipline":null,"slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516813+00:00 app[web.1]: {"index":{"_id":3}}
2016-03-12T04:29:51.516814+00:00 app[web.1]: {"id":3,"name":"test","email":"testtest#icloud.com","created_at":"2016-03-10T22:55:37.757Z","updated_at":"2016-03-10T22:55:37.757Z","password_digest":"$2a$10$06QP.eB.Srx2TvejUscyyOIuOnzGmEPewAvfxwE4pS9mm/jtpeyZ.","remember_digest":null,"admin":false,"activation_digest":"$2a$10$JdaYMdl8VQlFg7bkN2nClec/ZN49w5cno78LTj.vupqKN9.JOoSaa","activated":false,"activated_at":null,"reset_digest":null,"reset_sent_at":null,"location":null,"discipline":null,"slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516814+00:00 app[web.1]: {"index":{"_id":4}}
2016-03-12T04:29:51.516815+00:00 app[web.1]: {"id":4,"name":"test","email":"test.test#gmail.com","created_at":"2016-03-11T17:38:17.019Z","updated_at":"2016-03-11T17:38:17.019Z","password_digest":"$2a$10$3EGEVSC1PmX03YMH7bBt7erWXu7ssVT0KdcVfD99.mwJ7oAdax7MS","remember_digest":null,"admin":false,"activation_digest":"$2a$10$MtJkJQMQ25tH6PIuZEjka.mtPitSbODwjJ8qkorAwrWhfdbGl5ZQ.","activated":false,"activated_at":null,"reset_digest":null,"reset_sent_at":null,"location":null,"discipline":null,"slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516815+00:00 app[web.1]: {"index":{"_id":5}}
2016-03-12T04:29:51.516816+00:00 app[web.1]: {"id":5,"name":"test","email":"test#gioventunyc.com","created_at":"2016-03-11T17:41:22.759Z","updated_at":"2016-03-11T17:41:22.759Z","password_digest":"$2a$10$pj2f6Sw7Lk5Q/J6alKT.4.0XPIgqEV8BMAgars6WQbfXNqBPRBEZ2","remember_digest":null,"admin":false,"activation_digest":"$2a$10$dxECrTuI0/R7cZe69TVWSuvjrz7phhLQh22ZBfg7l9OG9yUm4QJGy","activated":false,"activated_at":null,"reset_digest":null,"reset_sent_at":null,"location":null,"discipline":null,"slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516816+00:00 app[web.1]: {"index":{"_id":6}}
2016-03-12T04:29:51.516817+00:00 app[web.1]: {"id":6,"name":"test","email":"test#gioventu.nyc","created_at":"2016-03-11T17:45:29.749Z","updated_at":"2016-03-11T17:45:29.749Z","password_digest":"$2a$10$gZM6tMEnO1K2JU.J7Nlm9.Vl5JH4RE6px1F5N5KcbGB7GsoRXhSXG","remember_digest":null,"admin":false,"activation_digest":"$2a$10$Erg4aoSYbKaC9HB78O1yXO1Dw0K11sQ4IHYIp595etw2eMBIsiliq","activated":false,"activated_at":null,"reset_digest":null,"reset_sent_at":null,"location":null,"discipline":null,"slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516817+00:00 app[web.1]: {"index":{"_id":7}}
2016-03-12T04:29:51.516818+00:00 app[web.1]: {"id":7,"name":"test","email":"rs#rrrr.nyc","created_at":"2016-03-12T04:06:14.603Z","updated_at":"2016-03-12T04:06:14.603Z","password_digest":"$2a$10$lKwxQS5Ff9eOti.YauPn8.y2JjHocgwWpJk8sWjtwJFtRxnjhEr1C","remember_digest":null,"admin":false,"activation_digest":"$2a$10$Z78l8dtLU5tJgbv70cdgU.dWvfR7zd1riskj59anTePdnBv7H/4IW","activated":false,"activated_at":null,"reset_digest":null,"reset_sent_at":null,"location":null,"discipline":null,"slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516819+00:00 app[web.1]: {"index":{"_id":8}}
2016-03-12T04:29:51.516821+00:00 app[web.1]: {"id":8,"name":"test","email":"rrrr#nyu.edu","created_at":"2016-03-12T04:19:22.961Z","updated_at":"2016-03-12T04:19:22.961Z","password_digest":"$2a$10$eXku5S8nLGXkxYnfeMARgesXNG76qMnIsrmLrTdIngT4t8L.uqQy.","remember_digest":null,"admin":false,"activation_digest":"$2a$10$7m4IKtrQ4WDfXmElvI9./OfeqpJS1guGK.X31mM0DPoRCcfscbrwK","activated":false,"activated_at":null,"reset_digest":null,"reset_sent_at":null,"location":null,"discipline":null,"slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516903+00:00 app[web.1]: 2016-03-12 04:29:51 +0000: < {"took":5,"errors":false,"items":[{"index":{"_index":"users","_type":"user","_id":"1","_version":4,"status":200}},{"index":{"_index":"users","_type":"user","_id":"2","_version":4,"status":200}},{"index":{"_index":"users","_type":"user","_id":"3","_version":4,"status":200}},{"index":{"_index":"users","_type":"user","_id":"4","_version":4,"status":200}},{"index":{"_index":"users","_type":"user","_id":"5","_version":4,"status":200}},{"index":{"_index":"users","_type":"user","_id":"6","_version":4,"status":200}},{"index":{"_index":"users","_type":"user","_id":"7","_version":4,"status":200}},{"index":{"_index":"users","_type":"user","_id":"8","_version":3,"status":200}}]}
2016-03-12T04:29:51.554058+00:00 app[web.1]: [3] * Listening on tcp://0.0.0.0:56115
2016-03-12T04:29:51.815153+00:00 heroku[web.1]: State changed from starting to up
2016-03-12T04:30:09.854889+00:00 app[web.1]: Started POST "/users" for 71.125.40.81 at 2016-03-12 04:30:09 +0000
2016-03-12T04:30:09.891335+00:00 app[web.1]: Processing by UsersController#create as HTML
2016-03-12T04:30:09.981602+00:00 app[web.1]: [1m[36mUser Exists (1.6ms)[0m [1mSELECT 1 AS one FROM "users" WHERE LOWER("users"."email") = LOWER('testtest#me.com') LIMIT 1[0m
2016-03-12T04:30:10.384702+00:00 heroku[router]: at=info method=POST path="/users" host=xxxx.herokuapp.com request_id=c95e17ca-3eb3-4dfb-9337-b393ad6826b4 fwd="71.125.40.81" dyno=web.1 connect=0ms service=526ms status=200 bytes=5915
2016-03-12T04:30:10.354983+00:00 app[web.1]: [1m[35m (0.9ms)[0m ROLLBACK
2016-03-12T04:30:10.360982+00:00 app[web.1]: Rendered shared/_error_messages.html.erb (1.1ms)
2016-03-12T04:30:10.363072+00:00 app[web.1]: Rendered users/new.html.erb within layouts/application (5.1ms)
2016-03-12T04:30:10.365694+00:00 app[web.1]: Rendered layouts/_shim.html.erb (0.3ms)
2016-03-12T04:30:10.369943+00:00 app[web.1]: Rendered layouts/_header.html.erb (3.7ms)
2016-03-12T04:30:10.370911+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.3ms)
2016-03-12T04:30:10.371340+00:00 app[web.1]: Completed 200 OK in 480ms (Views: 15.5ms | ActiveRecord: 3.3ms)
2016-03-12T04:30:14.904181+00:00 app[web.1]: Started GET "/login" for 71.125.40.81 at 2016-03-12 04:30:14 +0000
2016-03-12T04:30:14.958240+00:00 app[web.1]: Processing by SessionsController#new as HTML
2016-03-12T04:30:15.544900+00:00 heroku[router]: at=info method=GET path="/login" host=xxxx.herokuapp.com request_id=71f94b8f-7543-439e-833f-bf1161c1d37a fwd="71.125.40.81" dyno=web.1 connect=1ms service=633ms status=200 bytes=5561
2016-03-12T04:30:15.608618+00:00 heroku[router]: at=info method=GET path="/assets/application-6f5ae546d40366770d3a61453503cef12cb1811b5cf39fb0a67a1322f96873d9.css" host=xxxxx.herokuapp.com request_id=a2c69f95-d377-47a9-b1c7-5c4fb8594766 fwd="71.125.40.81" dyno=web.1 connect=0ms service=2ms status=200 bytes=29104
2016-03-12T04:30:15.518580+00:00 app[web.1]: Rendered sessions/new.html.erb within layouts/application (544.6ms)
2016-03-12T04:30:15.522546+00:00 app[web.1]: Rendered layouts/_shim.html.erb (0.3ms)
2016-03-12T04:30:15.529268+00:00 app[web.1]: Rendered layouts/_header.html.erb (6.1ms)
2016-03-12T04:30:15.530501+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.4ms)
2016-03-12T04:30:15.531077+00:00 app[web.1]: Completed 200 OK in 573ms (Views: 559.4ms | ActiveRecord: 0.0ms)
2016-03-12T04:30:15.645644+00:00 heroku[router]: at=info method=GET path="/assets/application-44f9363a0510d929eca5abc71e6baff54884aadab1c158713bd34869de9bf38c.js" host=xxxx.herokuapp.com request_id=3535b08a-2406-4d83-9e4e-22046b0e0db7 fwd="71.125.40.81" dyno=web.1 connect=0ms service=6ms status=200 bytes=123671
2016-03-12T04:30:17.308712+00:00 heroku[router]: at=info method=GET path="/password_resets/new" host=ancient-tor-3622.herokuapp.com request_id=9e49778c-5546-43d7-8990-fd543ad298b9 fwd="71.125.40.81" dyno=web.1 connect=0ms service=29ms status=200 bytes=5044
2016-03-12T04:30:17.269613+00:00 app[web.1]: Started GET "/password_resets/new" for 71.125.40.81 at 2016-03-12 04:30:17 +0000
2016-03-12T04:30:17.277696+00:00 app[web.1]: Processing by PasswordResetsController#new as HTML
2016-03-12T04:30:17.284988+00:00 app[web.1]: Rendered password_resets/new.html.erb within layouts/application (2.1ms)
2016-03-12T04:30:17.289052+00:00 app[web.1]: Rendered layouts/_shim.html.erb (0.4ms)
2016-03-12T04:30:17.292766+00:00 app[web.1]: Rendered layouts/_header.html.erb (1.5ms)
2016-03-12T04:30:17.294115+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.4ms)
2016-03-12T04:30:21.643797+00:00 app[web.1]: Started POST "/password_resets" for 71.125.40.81 at 2016-03-12 04:30:21 +0000
2016-03-12T04:30:21.745309+00:00 app[web.1]: [1m[33mUser Store (7.7ms)[0m {"id":2,"exception":["Faraday::ConnectionFailed","Connection refused - connect(2)"]}
2016-03-12T04:30:21.746719+00:00 app[web.1]: Completed 500 Internal Server Error in 100ms (Searchkick: 7.7ms | ActiveRecord: 9.8ms)
2016-03-12T04:30:21.751092+00:00 app[web.1]: Faraday::ConnectionFailed (Connection refused - connect(2)):
2016-03-12T04:30:21.751092+00:00 app[web.1]: app/models/user.rb:83:in `create_reset_digest'
2016-03-12T04:30:21.751093+00:00 app[web.1]: app/controllers/password_resets_controller.rb:13:in `create'
2016-03-12T04:30:21.836029+00:00 heroku[router]: at=info method=POST path="/password_resets" host=xxxxx.herokuapp.com request_id=69de3b2a-9f18-4a28-be0a-706a5dc9a341 fwd="71.125.40.81" dyno=web.1 connect=0ms service=181ms status=500 bytes=1714
I had to run heroku run rake search kick:reindex CLASS=User and it fixed it.
I remake my index and it works;
bundle exec rake searchkick:reindex:all
or if you want you could reindex item by item
Products.reindex
User.reindex
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 9 years ago.
I can't correctly pinpoint what exactly is causing the issue
This is a new website I just pushed to heroku, ran heroku rake db:migrate, and heroku restart
It works just fine locally but this happens in production
Here's the relevant portion of heroku logs
2013-05-03T23:16:27.189569+00:00 app[web.1]:
2013-05-03T23:16:27.189569+00:00 app[web.1]: Started GET "/signup" for xx.xx.xx.
xxx at 2013-05-03 23:16:27 +0000
2013-05-03T23:16:27.253381+00:00 app[web.1]: Rendered shared/_error_messages.h
tml.erb (0.4ms)
2013-05-03T23:16:27.253381+00:00 app[web.1]: Rendered layouts/_shim.html.erb (
0.0ms)
2013-05-03T23:16:27.253381+00:00 app[web.1]: Rendered layouts/_header.html.erb
(2.9ms)
2013-05-03T23:16:27.253381+00:00 app[web.1]: Processing by UsersController#new a
s HTML
2013-05-03T23:16:27.253381+00:00 app[web.1]: Rendered users/new.html.erb withi
n layouts/application (43.8ms)
2013-05-03T23:16:27.253381+00:00 app[web.1]: Completed 200 OK in 60ms (Views: 48
.4ms | ActiveRecord: 1.6ms | Solr: 0.0ms)
2013-05-03T23:16:27.922135+00:00 heroku[router]: at=info method=GET path=/favico
n.ico host= sleepy-river-xxxx.herokuapp.com fwd="xx.xx.xx.xxx" dyno=web.1 connect
=1ms service=4ms status=304 bytes=0
2013-05-03T23:16:27.268937+00:00 heroku[router]: at=info method=GET path=/signup
host= sleepy-river-xxxx.herokuapp.com fwd="xx.xx.xx.xxx" dyno=web.1 connect=6ms
service=81ms status=304 bytes=0
2013-05-03T23:16:47.934099+00:00 app[web.1]:
2013-05-03T23:16:47.934099+00:00 app[web.1]:
2013-05-03T23:16:47.934099+00:00 app[web.1]: Started POST "/users" for xx.xx.xx.
xxx at 2013-05-03 23:16:47 +0000
2013-05-03T23:16:48.248989+00:00 app[web.1]: Redirected to http://sleepy-river-xxxx.herokuapp.com/home
2013-05-03T23:16:48.248989+00:00 app[web.1]: Parameters: {"utf8"=>"???", "auth
enticity_token"=>"m+NCbnqHJk81yWgyY+Y709mQZ0N04MpW8MLGLXjbleA=", "user"=>{"name"
=>"testuser", "email"=>"testuser#email.com", "password"=>"[FILTERED]", "passwo
rd_confirmation"=>"[FILTERED]"}, "commit"=>"Create my account"}
2013-05-03T23:16:48.248989+00:00 app[web.1]: Completed 302 Found in 311ms (Activ
eRecord: 70.6ms)
2013-05-03T23:16:48.248989+00:00 app[web.1]: Processing by UsersController#creat
e as HTML
2013-05-03T23:16:48.435265+00:00 app[web.1]:
2013-05-03T23:16:48.435265+00:00 app[web.1]:
2013-05-03T23:16:48.435265+00:00 app[web.1]: Started GET "/home" for 75.82.32.16
4 at 2013-05-03 23:16:48 +0000
2013-05-03T23:16:48.649331+00:00 app[web.1]: FROM pg_attribute a L
EFT JOIN pg_attrdef d
2013-05-03T23:16:48.649331+00:00 app[web.1]: WHERE a.attrelid = '"h
ashtags"'::regclass
2013-05-03T23:16:48.649331+00:00 app[web.1]: LINE 4: WHERE a.attrel
id = '"hashtags"'::regclass
2013-05-03T23:16:48.649331+00:00 app[web.1]: ON a.attrelid = d.a
drelid AND a.attnum = d.adnum
2013-05-03T23:16:48.649617+00:00 app[web.1]: 23: <%= link_to "#"+h.hashtag
s, "#" %><br>
2013-05-03T23:16:48.649617+00:00 app[web.1]: 25:
2013-05-03T23:16:48.649845+00:00 app[web.1]: Rendered shared/_user_info.html.e
rb (4.4ms)
2013-05-03T23:16:48.649331+00:00 app[web.1]: ActionView::Template::Error (PGErro
r: ERROR: relation "hashtags" does not exist
2013-05-03T23:16:48.649617+00:00 app[web.1]: 22: <% #htags.each do |h| %>
2013-05-03T23:16:48.649617+00:00 app[web.1]:
2013-05-03T23:16:48.649845+00:00 app[web.1]: Processing by StaticPagesController
#home as HTML
2013-05-03T23:16:48.649331+00:00 app[web.1]:
2013-05-03T23:16:48.649331+00:00 app[web.1]:
^
2013-05-03T23:16:48.649331+00:00 app[web.1]: : SELECT a.attname, for
mat_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
2013-05-03T23:16:48.649617+00:00 app[web.1]: app/views/static_pages/home.html.
erb:22:in `_app_views_static_pages_home_html_erb___3097102804728997358_70437520'
2013-05-03T23:16:48.649845+00:00 app[web.1]:
2013-05-03T23:16:48.649331+00:00 app[web.1]: AND a.attnum > 0 AND
NOT a.attisdropped
2013-05-03T23:16:48.649331+00:00 app[web.1]: ORDER BY a.attnum
2013-05-03T23:16:48.649617+00:00 app[web.1]: 19: <div class="box">
2013-05-03T23:16:48.649617+00:00 app[web.1]: 24: <% end %>
2013-05-03T23:16:48.649617+00:00 app[web.1]: ):
2013-05-03T23:16:48.649617+00:00 app[web.1]: 20: Tagged Posts
2013-05-03T23:16:48.649617+00:00 app[web.1]: 21: <br>
2013-05-03T23:16:48.649845+00:00 app[web.1]: Rendered shared/_stats.html.erb (
38.9ms)
2013-05-03T23:16:48.649845+00:00 app[web.1]: Completed 500 Internal Server Error
in 209ms
2013-05-03T23:16:48.649845+00:00 app[web.1]: Rendered static_pages/home.html.e
rb within layouts/application (156.1ms)
2013-05-03T23:16:48.654562+00:00 heroku[router]: at=info method=GET path=/home h
ost=sleepy-river-xxxx.herokuapp.com fwd="xx.xx.xx.xxx" dyno=web.1 connect=1ms se
rvice=219ms status=500 bytes=643
2013-05-03T23:16:48.253053+00:00 heroku[router]: at=info method=POST path=/users
host= sleepy-river-xxxx.herokuapp.com fwd="xx.xx.xx.xxx" dyno=web.1 connect=3ms
service=395ms status=302 bytes=109
Something is wrong with the template that is loaded after a user signs up. Try it locally, I bet you'll find the answer you need.
Added hint:
Look at the line Relation HashTags does not exist. That holds the key to your problem.
I bet if you run
heroku run rake db:setup
and
heroku run rake db:migrate
Your problem will be solved