You are viewing a plain text version of this content. The canonical link for it is here.
Posted to zeta-issues@incubator.apache.org by "Jérôme Renard (JIRA)" <ji...@apache.org> on 2011/03/30 13:39:05 UTC

[jira] [Created] (ZETACOMP-70) component crashes with large uploads (>1GB)

component crashes with large uploads (>1GB)
-------------------------------------------

                 Key: ZETACOMP-70
                 URL: https://issues.apache.org/jira/browse/ZETACOMP-70
             Project: Zeta Components
          Issue Type: Bug
          Components: Webdav
            Reporter: Jérôme Renard


The Problem:
On my work with the Webdav component i figured out that every php script using with component crashs with file uploads larger than 1GB.  After some server tweaking it was clear that there must be a reason in the component code.
I traced the code and found a line like this "  $properties['body'] = $body  ".
Then it was clear. A string with 1GB was copied into an array and crashes the php module with this operation.

The workaround:
To avoid large memory usage I went over to use the php tempory storage. So the maximum amout of used ram is at my configuration 2MB and the rest is streamed to disk. To make working with it easier I wrote a wrapper clase and placed it on every part that is reading or writeing the document body. Luckily this is only neccessary at Webdav/src/transport.php and all of my own files.
As the wrapper could also be used with other components its located at Base.

Note :
This issue as been described by Christian Weber on the zeta-dev mailing list :
- http://mail-archives.apache.org/mod_mbox/incubator-zeta-dev/201103.mbox/%3C4D9324CB.9080003@hdpmail.de%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (ZETACOMP-70) component crashes with large uploads (>1GB)

Posted by "Christian Weber (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZETACOMP-70?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Weber updated ZETACOMP-70:
------------------------------------

    Attachment: Base.patch

Wrapper Class used in the Webdav patch (using temporary stream instead of string for webdav content)

> component crashes with large uploads (>1GB)
> -------------------------------------------
>
>                 Key: ZETACOMP-70
>                 URL: https://issues.apache.org/jira/browse/ZETACOMP-70
>             Project: Zeta Components
>          Issue Type: Bug
>          Components: Webdav
>            Reporter: Jérôme Renard
>         Attachments: Base.patch, Webdav.patch
>
>
> The Problem:
> On my work with the Webdav component i figured out that every php script using with component crashs with file uploads larger than 1GB.  After some server tweaking it was clear that there must be a reason in the component code.
> I traced the code and found a line like this "  $properties['body'] = $body  ".
> Then it was clear. A string with 1GB was copied into an array and crashes the php module with this operation.
> The workaround:
> To avoid large memory usage I went over to use the php tempory storage. So the maximum amout of used ram is at my configuration 2MB and the rest is streamed to disk. To make working with it easier I wrote a wrapper clase and placed it on every part that is reading or writeing the document body. Luckily this is only neccessary at Webdav/src/transport.php and all of my own files.
> As the wrapper could also be used with other components its located at Base.
> Note :
> This issue as been described by Christian Weber on the zeta-dev mailing list :
> - http://mail-archives.apache.org/mod_mbox/incubator-zeta-dev/201103.mbox/%3C4D9324CB.9080003@hdpmail.de%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (ZETACOMP-70) component crashes with large uploads (>1GB)

Posted by "Christian Weber (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZETACOMP-70?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Weber updated ZETACOMP-70:
------------------------------------

    Attachment: Webdav.patch

Modification of the Webdav transport component. It's now using a wrapper class for the php temporary stream instead of strings to avoid problems with large files.

> component crashes with large uploads (>1GB)
> -------------------------------------------
>
>                 Key: ZETACOMP-70
>                 URL: https://issues.apache.org/jira/browse/ZETACOMP-70
>             Project: Zeta Components
>          Issue Type: Bug
>          Components: Webdav
>            Reporter: Jérôme Renard
>         Attachments: Base.patch, Webdav.patch
>
>
> The Problem:
> On my work with the Webdav component i figured out that every php script using with component crashs with file uploads larger than 1GB.  After some server tweaking it was clear that there must be a reason in the component code.
> I traced the code and found a line like this "  $properties['body'] = $body  ".
> Then it was clear. A string with 1GB was copied into an array and crashes the php module with this operation.
> The workaround:
> To avoid large memory usage I went over to use the php tempory storage. So the maximum amout of used ram is at my configuration 2MB and the rest is streamed to disk. To make working with it easier I wrote a wrapper clase and placed it on every part that is reading or writeing the document body. Luckily this is only neccessary at Webdav/src/transport.php and all of my own files.
> As the wrapper could also be used with other components its located at Base.
> Note :
> This issue as been described by Christian Weber on the zeta-dev mailing list :
> - http://mail-archives.apache.org/mod_mbox/incubator-zeta-dev/201103.mbox/%3C4D9324CB.9080003@hdpmail.de%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira