Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-5047

API proxy returns "204 No Content" if the underlying call takes more than a few seconds

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.5.1
    • 1.5.1
    • ambari-agent
    • None

    Description

      It looks like the API proxy behaves in an expected manner (returns HTTP code 204 with no response) when the underlying API call being proxied does not return in a timely manner.
      It seems like this threshold is around 3 seconds.
      When I was testing Falcon, I kept getting 204 from Ambari's API proxy, but the underlying API calls were successful when directly run against Falcon.
      3 seconds is a bit aggressive. Perhaps we can pass a parameter to change the timeout value in milliseconds, with a hard limit on 15 seconds or so?
      Also, returning 204 is not ideal. We should return

      {error: "400", message: "Connection timed out"}

      or something like that (I didn't check the actual format that we use... just an example), so that the API client can perform appropriate error handling.

      Attachments

        1. AMBARI-5047.patch
          7 kB
          Vitaly Brodetskyi

        Issue Links

          Activity

            People

              vbrodetskyi Vitaly Brodetskyi
              vbrodetskyi Vitaly Brodetskyi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: