Uploaded image for project: 'Zeta Components'
  1. Zeta Components
  2. ZETACOMP-70

component crashes with large uploads (>1GB)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Webdav
    • None

    Description

      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 :

      Attachments

        1. Base.patch
          5 kB
          Christian Weber
        2. Webdav.patch
          2 kB
          Christian Weber

        Activity

          People

            Unassigned Unassigned
            jeromer Jérôme Renard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: