William Bardwell created TS-1247:
------------------------------------

             Summary: Data from a response transform in a plugin causes excess 
memory usage
                 Key: TS-1247
                 URL: https://issues.apache.org/jira/browse/TS-1247
             Project: Traffic Server
          Issue Type: Bug
          Components: HTTP
    Affects Versions: 3.0.4
            Reporter: William Bardwell
            Priority: Minor


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to