Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-7503

When uploading a large (4MB) OAS 3.0 ActiveDocs in the Admin Portal, the page is either unresponsive or returns 502 (Bad Gateway)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • 2.10 GA
    • System
    • False
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Hide
      1. Login to the Admin Portal.
      2. Choose a Product.
      3. Click in "ActiveDocs" and "Create a new spec".
      4. Paste a 4MB Swagger Spec under "API JSON Spec"

      Expected: The Admin Portal should allow us to click in "Create Service".

      Behavior: The page hangs and/or after clicking on it returns HTTP/502 (Bad Gateway).

      Failed Workaround: Using the 3scale toolbox with the default settings also returns "Bad Gateway.

      Successful Workaround: Use the 3scale toolbox with "--skip-swagger-validations". This not only makes the customer to have to use the 3scale toolbox instead of the Admin Portal but also makes us rely on a 3rd party tool instead of 3scale in order to validate the Swagger.

      Show
      Login to the Admin Portal. Choose a Product. Click in "ActiveDocs" and "Create a new spec". Paste a 4MB Swagger Spec under "API JSON Spec" Expected: The Admin Portal should allow us to click in "Create Service". Behavior:  The page hangs and/or after clicking on it returns HTTP/502 (Bad Gateway). Failed Workaround:  Using the 3scale toolbox with the default settings also returns "Bad Gateway. Successful Workaround:  Use the 3scale toolbox with "--skip-swagger-validations". This not only makes the customer to have to use the 3scale toolbox instead of the Admin Portal but also makes us rely on a 3rd party tool instead of 3scale in order to validate the Swagger.

    Description

      The Red Hat 3scale Admin Portal hangs (e.g. page unresponsive, 502 Bad Gateway, etc.) when an Active Docs (OAS 3.0) with 4MB of size is uploaded to it.

      We suspect the issue is the size from it:

      • Disabling the Swagger Validation in the Admin Portal doesn't solve the issue.
      • Using the 3scale toolbox with Swagger Validation enabled also doesn't solve it.

      The single workaround is to use the 3scale toolbox without the Swagger Validation (e.g. --skip-swagger-validations needs to be enabled), otherwise it will return an error similar to the below:

       

      {
        "code": "E_UNKNOWN",
        "message": "#<Net::HTTPGatewayTimeOut 504 Gateway Time-out readbody=true> body=<html><body><h1>504 Gateway Time-out</h1>\nThe server didn't respond in time.\n</body></html>\n",
        "class": "ThreeScale::API::HttpClient::UnexpectedResponseError",
        "stacktrace": [
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/3scale-api-1.4.0/lib/3scale/api/http_client.rb:82:in `unexpected!'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/3scale-api-1.4.0/lib/3scale/api/http_client.rb:61:in `parse'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/3scale-api-1.4.0/lib/3scale/api/http_client.rb:44:in `post'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/3scale-api-1.4.0/lib/3scale/api/client.rb:558:in `create_activedocs'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/3scale_toolbox-0.18.3/lib/3scale_toolbox/remote_cache.rb:144:in `public_send'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/3scale_toolbox-0.18.3/lib/3scale_toolbox/remote_cache.rb:144:in `method_missing'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/3scale_toolbox-0.18.3/lib/3scale_toolbox/entities/activedocs.rb:33:in `create_activedocs'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/3scale_toolbox-0.18.3/lib/3scale_toolbox/entities/activedocs.rb:6:in `create'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/3scale_toolbox-0.18.3/lib/3scale_toolbox/commands/activedocs_command/create_command.rb:40:in `run'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/cri-2.15.11/lib/cri/command_runner.rb:34:in `call'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/cri-2.15.11/lib/cri/command_dsl.rb:294:in `block in runner'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/cri-2.15.11/lib/cri/command.rb:362:in `run_this'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/cri-2.15.11/lib/cri/command.rb:298:in `run'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/cri-2.15.11/lib/cri/command.rb:316:in `run'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/cri-2.15.11/lib/cri/command.rb:316:in `run'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/3scale_toolbox-0.18.3/lib/3scale_toolbox/cli.rb:47:in `block in run'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/3scale_toolbox-0.18.3/lib/3scale_toolbox/cli/error_handler.rb:5:in `block in error_watchdog'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/3scale_toolbox-0.18.3/lib/3scale_toolbox/cli/error_handler.rb:11:in `error_watchdog'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/3scale_toolbox-0.18.3/lib/3scale_toolbox/cli/error_handler.rb:5:in `error_watchdog'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/3scale_toolbox-0.18.3/lib/3scale_toolbox/cli.rb:44:in `run'",
          "/opt/3scale-toolbox/embedded/lib/ruby/gems/2.5.0/gems/3scale_toolbox-0.18.3/exe/3scale:15:in `<top (required)>'",
          "/opt/3scale-toolbox/bin/3scale:23:in `load'",
          "/opt/3scale-toolbox/bin/3scale:23:in `<main>'"
        ]
      }

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-ekonecsn Estevao Konecsni
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: