avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AVRO-1050) Avro PHP consumes too much memory due to code in io.php (AvroStringIO append_str)
Date Thu, 10 May 2012 19:30:51 GMT

     [ https://issues.apache.org/jira/browse/AVRO-1050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Doug Cutting updated AVRO-1050:

    Fix Version/s:     (was: 1.6.3)
         Assignee: A B

The patch applies cleanly for me and tests pass after applying it.  I will commit this soon
unless someone objects.
> Avro PHP consumes too much memory due to code in io.php (AvroStringIO append_str)
> ---------------------------------------------------------------------------------
>                 Key: AVRO-1050
>                 URL: https://issues.apache.org/jira/browse/AVRO-1050
>             Project: Avro
>          Issue Type: Bug
>          Components: php
>    Affects Versions: 1.6.0, 1.6.1, 1.6.2, 1.6.3
>            Reporter: A B
>            Assignee: A B
>              Labels: patch
>             Fix For: 1.7.0
>         Attachments: AVRO-1050-2.diff, AVRO-1050.diff
> While attempting to encode large messages, our team found that the PHP run-time would
exceed its memory limit and die. Profiling and use of memory_get_usage showed us that we were
spending a lot of time in append_str and that the PHP process grew after every call to this
method, resulting in the leak-like behavior that caused the process to grow and then crash.
We rewrote append_str to use the string concatenation operator instead of the somewhat elaborate
scheme in place today (str_split, followed by the copying of one byte at a time from the latter
array to the final string) and the memory usage issues disappeared with no loss of functionality.
We would like to provide the patch to fix this issue.

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


View raw message