Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-1247

Data from a response transform in a plugin causes excess memory usage

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 3.0.4
    • 3.3.2
    • HTTP
    • None

    Description

      If you have a plugin implementing a response transform and the data sending to the UA is slow TS will use huge amounts of memory for larger files. (e.g. 16G Vsize for a 50M file.)
      This seems to be several problems combined, first, the MIOBuffer used for the chunking tunnel uses 2M buffers, and when handling data from a transform it ends up putting just the chunk markers in a buffer, then gets a buffer from the transform, then a new 2M buffer...Once I fix that, 50M files are ok, but 1G files still exhaust memory as they end up all in memory because there is no flow-control in some of the VConnections and such between a transform and the chunking tunnel. I did a lame patch that I need to revise that fixed the problem by making TransformTerminus not send data if the destination that it is writing to has too much data in it, plus I made my plugin check how much data the destination for the transform has and don't write to it then either. But it seems like I need to find the other side of both of those, and suppress WRITE_READY (and maybe IMMEDIATE) event sending when they are full, but I haven't been able to figure out what the other side is for those yet.

      Attachments

        Issue Links

          Activity

            People

              amc Alan M. Carroll
              wbardwel William Bardwell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: