我遇到了这个间歇性问题,我的客户端从(我认为)向 Heroku 上的 Rails 服务器的单个 HTTP 请求接收到多个 JSON 响应。这是显示问题的 Heroku 日志...
2012-04-20T00:22:27+00:00 app[web.1]: Started POST "/games/2/call" for 76.171.181.11 at 2012-04-19 17:22:27 -0700
2012-04-20T00:22:27+00:00 app[web.1]: Processing by GamesController#call as */*
2012-04-20T00:22:27+00:00 app[web.1]: Parameters: {"fb_id"=>"0", "id"=>"2"}
2012-04-20T00:22:27+00:00 app[web.1]: Completed 200 OK in 163ms (Views: 0.3ms | ActiveRecord: 93.3ms)
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4594ms status=200 bytes=2013
2012-04-20T00:22:27+00:00 app[web.1]: cache: [POST /games/2/call] invalidate, pass
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4546ms status=200 bytes=2013
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4594ms status=200 bytes=2012
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4570ms status=200 bytes=2013
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4560ms status=200 bytes=2013
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4534ms status=200 bytes=2013
2012-04-20T00:22:27+00:00 heroku[nginx]: 76.171.181.11 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 560 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 76.171.181.11 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 560 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 76.171.181.11 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 539 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 207.151.231.155 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 540 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 207.151.231.155 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 540 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 207.151.32.38 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 540 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 108.70.74.121 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 540 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19"
我是 Rails 和 Heroku 的新手,所以我不能完全理解这个日志来弄清楚发生了什么。Heroku 上的 Rails 应用程序是从我的客户端接收多个 HTTP 请求,还是只接收一个 HTTP 请求并返回多个 JSON 响应?
非常感谢您的智慧!