Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timeout of server #13

Open
qtrandev opened this issue Dec 15, 2015 · 2 comments
Open

Fix timeout of server #13

qtrandev opened this issue Dec 15, 2015 · 2 comments

Comments

@qtrandev
Copy link
Member

Sometimes the server times out and the Heroku app throws an error. Contact me for possible logs.

@CyberStrike
Copy link
Contributor

2015-12-15T01:49:57.842584+00:00 app[web.1]: Started GET "/api/Buses.json" for 50.206.104.14 at 2015-12-15 01:49:57 +0000
2015-12-15T01:49:57.844058+00:00 app[web.1]: Processing by MiamiDadeTransitController#proxy as JSON
2015-12-15T01:49:57.844081+00:00 app[web.1]: Parameters: {"endpoint"=>"Buses"}
2015-12-15T01:50:06.791903+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/api/Buses.json" host=miami-transit-api.herokuapp.com request_id=216454f5-b1e6-44ee-b962-e7daf32e6119 fwd="50.206.104.14" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0
2015-12-15T01:50:07.507814+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/api/Buses.json" host=miami-transit-api.herokuapp.com request_id=81fa7604-9648-4fff-92a9-4415b4c3fb6d fwd="50.206.104.14" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0
2015-12-15T01:50:09.344848+00:00 app[web.1]: Completed 500 Internal Server Error in 127204ms
2015-12-15T01:50:09.364085+00:00 app[web.1]:
2015-12-15T01:50:09.344852+00:00 app[web.1]: [Raygun] Tracking Exception...
2015-12-15T01:50:09.364089+00:00 app[web.1]: Errno::ETIMEDOUT (Connection timed out - connect(2) for "www.miamidade.gov" port 80):
2015-12-15T01:50:09.364092+00:00 app[web.1]: app/controllers/miami_dade_transit_controller.rb:50:in proxy' 2015-12-15T01:50:09.364091+00:00 app[web.1]: app/models/miami_dade_transit.rb:41:inproxy'
2015-12-15T01:50:09.364093+00:00 app[web.1]:
2015-12-15T01:50:09.364093+00:00 app[web.1]:
2015-12-15T01:50:09.365838+00:00 app[web.1]: Started GET "/api/Buses.json" for 50.206.104.14 at 2015-12-15 01:50:09 +0000
2015-12-15T01:50:09.367900+00:00 app[web.1]: Processing by MiamiDadeTransitController#proxy as JSON
2015-12-15T01:50:09.367964+00:00 app[web.1]: Parameters: {"endpoint"=>"Buses"}
2015-12-15T01:50:30.848895+00:00 app[web.1]: Completed 500 Internal Server Error in 127210ms
2015-12-15T01:50:30.880975+00:00 app[web.1]:
2015-12-15T01:50:30.880979+00:00 app[web.1]: Errno::ETIMEDOUT (Connection timed out - connect(2) for "www.miamidade.gov" port 80):
2015-12-15T01:50:30.880980+00:00 app[web.1]: app/models/miami_dade_transit.rb:41:in proxy' 2015-12-15T01:50:30.849914+00:00 app[web.1]: [Raygun] Tracking Exception... 2015-12-15T01:50:30.880982+00:00 app[web.1]: app/controllers/miami_dade_transit_controller.rb:50:inproxy'
2015-12-15T01:50:30.880982+00:00 app[web.1]:
2015-12-15T01:50:30.880983+00:00 app[web.1]:
2015-12-15T01:50:35.456350+00:00 app[web.1]: Completed 500 Internal Server Error in 127215ms
2015-12-15T01:50:35.456482+00:00 app[web.1]: [Raygun] Tracking Exception...
2015-12-15T01:50:35.479753+00:00 app[web.1]:
2015-12-15T01:50:35.479756+00:00 app[web.1]: Errno::ETIMEDOUT (Connection timed out - connect(2) for "www.miamidade.gov" port 80):
2015-12-15T01:50:35.479758+00:00 app[web.1]: app/models/miami_dade_transit.rb:41:in proxy' 2015-12-15T01:50:35.479759+00:00 app[web.1]: app/controllers/miami_dade_transit_controller.rb:50:inproxy'
2015-12-15T01:50:35.479760+00:00 app[web.1]:
2015-12-15T01:50:35.479761+00:00 app[web.1]:
2015-12-15T01:50:49.536321+00:00 app[web.1]: Completed 500 Internal Server Error in 127213ms
2015-12-15T01:50:49.536462+00:00 app[web.1]: [Raygun] Tracking Exception...
2015-12-15T01:50:49.551698+00:00 app[web.1]:
2015-12-15T01:50:49.551702+00:00 app[web.1]: Errno::ETIMEDOUT (Connection timed out - connect(2) for "www.miamidade.gov" port 80):
2015-12-15T01:50:49.551703+00:00 app[web.1]: app/models/miami_dade_transit.rb:41:in proxy' 2015-12-15T01:50:49.551704+00:00 app[web.1]: app/controllers/miami_dade_transit_controller.rb:50:inproxy'
2015-12-15T01:50:49.551705+00:00 app[web.1]:
2015-12-15T01:50:49.551706+00:00 app[web.1]:
2015-12-15T01:52:05.056352+00:00 app[web.1]: Completed 500 Internal Server Error in 127212ms
2015-12-15T01:52:05.056512+00:00 app[web.1]: [Raygun] Tracking Exception...
2015-12-15T01:52:05.076424+00:00 app[web.1]: app/controllers/miami_dade_transit_controller.rb:50:in proxy' 2015-12-15T01:52:05.076418+00:00 app[web.1]: 2015-12-15T01:52:05.076422+00:00 app[web.1]: Errno::ETIMEDOUT (Connection timed out - connect(2) for "www.miamidade.gov" port 80): 2015-12-15T01:52:05.076423+00:00 app[web.1]: app/models/miami_dade_transit.rb:41:inproxy'
2015-12-15T01:52:05.076426+00:00 app[web.1]:
2015-12-15T01:52:05.076425+00:00 app[web.1]:
2015-12-15T01:52:16.576975+00:00 app[web.1]: Completed 500 Internal Server Error in 127209ms
2015-12-15T01:52:16.577156+00:00 app[web.1]: [Raygun] Tracking Exception...
2015-12-15T01:52:16.609617+00:00 app[web.1]:
2015-12-15T01:52:16.609624+00:00 app[web.1]: app/models/miami_dade_transit.rb:41:in proxy' 2015-12-15T01:52:16.609623+00:00 app[web.1]: Errno::ETIMEDOUT (Connection timed out - connect(2) for "www.miamidade.gov" port 80): 2015-12-15T01:52:16.609626+00:00 app[web.1]: app/controllers/miami_dade_transit_controller.rb:50:inproxy'
2015-12-15T01:52:16.609626+00:00 app[web.1]:
2015-12-15T01:52:16.609627+00:00 app[web.1]:
2015-12-15T02:15:58.544305+00:00 heroku[web.1]: Idling
2015-12-15T02:15:58.544979+00:00 heroku[web.1]: State changed from up to down
2015-12-15T02:16:03.643678+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-12-15T02:16:05.447386+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2015-12-15T02:16:05.447470+00:00 app[web.1]: === puma shutdown: 2015-12-15 02:16:05 +0000 ===
2015-12-15T02:16:05.447474+00:00 app[web.1]: - Goodbye!
2015-12-15T02:16:07.086562+00:00 heroku[web.1]: Process exited with status 0

@CyberStrike
Copy link
Contributor

Possible fix is to write better code and handle the error and maybe return the cached object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants