title: nginx have too many 499 or 504 status code for half one hour
body: <p>I deploy one web server in linode, use nginx as the proxy server.I check the nginx log find too many 499  and 504 errors in the log for half one hour. The log:</p>
  
  <pre><code>186.178.211.41~-~23/Nov/2014:19:42:41 +0000~2014-11-23T19:42:41+00:00~GET /category/?format=json&amp;device_uid=mzHPz5IlTnd35XsLIcM6RwwAil4=&amp;language_code=es-mx HTTP/1.1~499~0~-~NativeHost~15.484~-~.
  186.178.211.41~-~23/Nov/2014:19:42:41 +0000~2014-11-23T19:42:41+00:00~GET /hot_search_words/?format=json&amp;device_id=mzHPz5IlTnd35XsLIcM6RwwAil4=&amp;language_code=es-mx HTTP/1.1~499~0~-~NativeHost~15.491~-~.
  92.244.224.127~-~23/Nov/2014:19:42:44 +0000~2014-11-23T19:42:44+00:00~GET /artists/ru-RU/hot/?format=json&amp;device_id=trXB2a4sVjugB3g6400Ivf6JVq0=&amp;language_code=ru-ru HTTP/1.1~499~0~file:///Applications/Install/92C003B2-2C7B-499E-8533-F580EF1E5FE8/Install/~NativeHost~3.772~-~.
  178.207.247.88~-~23/Nov/2014:19:42:44 +0000~2014-11-23T19:42:44+00:00~GET /artists/ru-RU/hot/?format=json&amp;device_id=p3O/TpqU7tPBrw4QJamBI91FuGo=&amp;language_code=ru-ru HTTP/1.1~499~0~file:///Applications/Install/92C003B2-2C7B-499E-8533-F580EF1E5FE8/Install/~NativeHost~18.669~-~.
  189.167.212.240~-~23/Nov/2014:19:42:49 +0000~2014-11-23T19:42:49+00:00~GET /search/soda%20sterio/?format=json&amp;device_id=a7xk4UCiPSp52cla6hA8glcY/xc=&amp;language_code=es-mx HTTP/1.1~499~0~file:///Applications/Install/92C003B2-2C7B-499E-8533-F580EF1E5FE8/Install/~NativeHost~33.372~-~.
  187.127.153.104~-~23/Nov/2014:19:42:49 +0000~2014-11-23T19:42:49+00:00~GET /artists/pt-BR/hot/?format=json&amp;device_id=nUHU4vR/N1zrqXZGtz3kEv44H40=&amp;language_code=pt-br HTTP/1.1~499~0~file:///Applications/Install/92C003B2-2C7B-499E-8533-F580EF1E5FE8/Install/~NativeHost~2.788~-~.
  178.207.247.88~-~23/Nov/2014:19:42:51 +0000~2014-11-23T19:42:51+00:00~GET /artists/ru-RU/hot/?format=json&amp;device_id=p3O/TpqU7tPBrw4QJamBI91FuGo=&amp;language_code=ru-ru HTTP/1.1~499~0~file:///Applications/Install/92C003B2-2C7B-499E-8533-F580EF1E5FE8/Install/~NativeHost~2.780~-~.
  201.160.162.251~-~23/Nov/2014:19:42:51 +0000~2014-11-23T19:42:51+00:00~GET /category/?format=json&amp;device_uid=3R9U1EC9t9OPyCG+xx587jawrA4=&amp;language_code=es-mx HTTP/1.1~499~0~-~NativeHost~37.645~-~.
  201.160.162.251~-~23/Nov/2014:19:42:51 +0000~2014-11-23T19:42:51+00:00~GET /hot_search_words/?format=json&amp;device_id=3R9U1EC9t9OPyCG+xx587jawrA4=&amp;language_code=es-mx HTTP/1.1~499~0~-~NativeHost~37.658~-~.
  191.40.56.15~-~23/Nov/2014:19:42:52 +0000~2014-11-23T19:42:52+00:00~GET /download_search/Coldplay/?format=json&amp;device_id=BstZoStXYr9n7dta3lH87LZ+JdQ=&amp;language_code=pt-br HTTP/1.1~200~36502~-~NativeHost~60.150~0.151~.
  179.176.171.88~-~23/Nov/2014:19:42:53 +0000~2014-11-23T19:42:53+00:00~GET /download_search/mc%20daleste/?format=json&amp;device_id=khIXpv8FfabUN+rP3W1zryMuKTg=&amp;language_code=pt-br HTTP/1.1~499~0~-~NativeHost~27.803~-~.
  200.49.206.194~-~23/Nov/2014:19:42:57 +0000~2014-11-23T19:42:57+00:00~GET /hot_search_words/?format=json&amp;device_id=LXpdPQFTQvlpsxQoFx7Wc8lu3Ig=&amp;language_code=es-mx HTTP/1.1~499~0~-~NativeHost~44.730~-~.
  200.49.206.196~-~23/Nov/2014:19:42:57 +0000~2014-11-23T19:42:57+00:00~GET /category/?format=json&amp;device_uid=LXpdPQFTQvlpsxQoFx7Wc8lu3Ig=&amp;language_code=es-mx HTTP/1.1~499~0~-~NativeHost~42.503~-~.
  82.54.64.173~-~23/Nov/2014:19:42:57 +0000~2014-11-23T19:42:57+00:00~GET /search_song/Eminem/?format=json&amp;device_id=93rtmqeKtFWwLKryT6oUs+1vxuc=&amp;language_code=it-it HTTP/1.1~499~0~-~NativeHost~25.195~-~.
  79.30.49.69~-~23/Nov/2014:19:42:58 +0000~2014-11-23T19:42:58+00:00~GET /category/11/?format=json&amp;device_id=hy/IVVuDP3UIxg4r3ht7mHJ9ZTU=&amp;language_code=it-it HTTP/1.1~499~0~-~NativeHost~25.384~-~.
  31.22.48.80~-~23/Nov/2014:19:42:59 +0000~2014-11-23T19:42:59+00:00~GET /download_search/Iggy%20Azalea/?format=json&amp;device_id=0HXsA4AwHsE+j9Bx0I6gtiLV63A=&amp;language_code=it-it HTTP/1.1~499~0~-~NativeHost~38.689~-~.
  186.16.172.168~-~23/Nov/2014:19:43:00 +0000~2014-11-23T19:43:00+00:00~GET /category/?format=json&amp;device_uid=Fv+ux25HB4g+0u7ANpmEjSpN9U4=&amp;language_code=es-mx HTTP/1.1~499~0~-~NativeHost~20.327~-~.
  186.16.172.168~-~23/Nov/2014:19:43:00 +0000~2014-11-23T19:43:00+00:00~GET /hot_search_words/?format=json&amp;device_id=Fv+ux25HB4g+0u7ANpmEjSpN9U4=&amp;language_code=es-mx HTTP/1.1~499~0~-~NativeHost~20.317~-~.
  83.149.35.184~-~23/Nov/2014:19:43:01 +0000~2014-11-23T19:43:01+00:00~GET /hot_search_words/?format=json&amp;device_id=Srf/h9PjMl9IqO/RRW+R63f/fM4=&amp;language_code=ru-ru HTTP/1.1~499~0~-~NativeHost~26.999~-~.
  </code></pre>
  
  <p>this is the nginx log at normal time:</p>
  
  <blockquote>
    <p>99.20.177.137~-~24/Nov/2014:06:33:08 +0000~2014-11-24T06:33:08+00:00~GET /category/?format=json&amp;device_uid=aMjSSmVjO89d+pCPIpDCDmcwhcU=&amp;language_code=en-us
    HTTP/1.1~200~1217~-~NativeHost~0.050~0.050~.
    99.20.177.137~-~24/Nov/2014:06:33:08 +0000~2014-11-24T06:33:08+00:00~GET /hot_search_words/?format=json&amp;device_id=aMjSSmVjO89d+pCPIpDCDmcwhcU=&amp;language_code=en-us
    HTTP/1.1~200~1036~-~NativeHost~0.049~0.049~.
    213.119.140.83~-~24/Nov/2014:06:33:08 +0000~2014-11-24T06:33:08+00:00~GET /category/5/?format=json&amp;device_id=FxDpCbvaAT3cm97imBFribqr4dI=&amp;language_code=nl-nl
    HTTP/1.1~200~3359~-~NativeHost~0.024~0.024~.
    201.29.210.76~-~24/Nov/2014:06:33:11 +0000~2014-11-24T06:33:11+00:00~GET /category/?format=json&amp;device_uid=9dcT9DnwXug7R4KHGZvC2PReGkg=&amp;language_code=pt-br
    HTTP/1.1~200~1217~-~NativeHost~0.008~0.008~.
    201.29.210.76~-~24/Nov/2014:06:33:11 +0000~2014-11-24T06:33:11+00:00~GET /hot_search_words/?format=json&amp;device_id=9dcT9DnwXug7R4KHGZvC2PReGkg=&amp;language_code=pt-br
    HTTP/1.1~200~1036~-~NativeHost~0.009~0.009~.
    107.77.80.86~-~24/Nov/2014:06:33:12 +0000~2014-11-24T06:33:12+00:00~GET /download_search/Linkin%20Park/?format=json&amp;device_id=8svpotKbUezqsRWIZrHER0IqEu8=&amp;language_code=en-us
    HTTP/1.1~200~32708~-~NativeHost~0.105~0.105~.
    173.209.211.245~-~24/Nov/2014:06:33:12 +0000~2014-11-24T06:33:12+00:00~GET /download_search/tony%20toni%20tone%20just%20me%20and%20you/?format=json&amp;device_id=wMvgYR5zUWlo8DuXdC6QjmMGAaY=&amp;language_code=en-us
    HTTP/1.1~200~39~-~NativeHost~0.122~0.122~.</p>
  </blockquote>
  
  <p>I use the fastcgi as the python wsgi server. After a while, the web server be normal. 
  I want to know why this happen and how to avoid this accident?</p>