jeudi 14 mai 2015

RestClient::RequestTimeout in controller#method ruby on rails

I am making the following rest get request:

 rest_user = JSON.parse(RestClient.get APP_CONFIG['api_url'] + "users/", :params => {:token => APP_CONFIG['token'], :full => 'true'} )["users"] 

I get the following error back after a minute:

 RestClient::RequestTimeout in controller#method


rbenv/versions/1.8.7-p374/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:184:in `transmit'
rbenv/versions/1.8.7-p374/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
rbenv/versions/1.8.7-p374/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
rbenv/versions/1.8.7-p374/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient.rb:68:in `get'

Now when I am tailing the logs of the actual service that is receiving this request, it is performing the requested request and completes it without any error.

But the consumer(the web applicaion) is throwing the request timeout error before the request has actually been fully completed.

Aucun commentaire:

Enregistrer un commentaire