• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Bug
    • Image file upload fails

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Image file upload fails

    • Issue Tools
      • View Changes
    1. issueid=6111 October 17, 2020 11:51 AM
      madolfsson madolfsson is offline
      New Member
      Image file upload fails

      In the Wiki File Browser, Image uploads fails with two separate errors.

      <errors>
      <error><![CDATA[Failed to write file. Check disc quotas and permissions for the path: /www/phenompilots.org/wiki_attachments/c/7/16/full.vw]]></error>
      </errors>

      -or-

      /wiki_ajax.php?c=upload returns a 502

      However uploading .zip files work, so it is not a permission issue. The failure occurs within 2-3 seconds so I can't see it being a processing timeout issue, although nginx reports:

      2020/10/17 10:49:42 [error] 3123015#3123015: *2497863 recv() failed (104: Connection reset by peer) while reading response header from upstream,
    Issue Details
    Issue Number 6111
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Attachments
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 4.1.0
    Fixed Version 4.1.3
    Milestone (none)
    Software DependencyvBulletin 4.x w/ ckEditor
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. October 17, 2020 12:19 PM
      madolfsson madolfsson is offline
      New Member
      Have been able to track it down to this error that occurs instantly, looking into what time limits is getting exceed.

      [17-Oct-2020 12:17:46] WARNING: [pool www] child 3778642 said into stderr: "php-fpm7.4: time limit exceeded `Operation canceled' @ fatal/cache.c/GetImagePixelCache/1868."
      Reply Reply  
    2. October 17, 2020 7:19 PM
      pegasus pegasus is offline
      VaultWiki Team
      If you checked the path and permissions are okay, then I would still encourage you to check the disk usage at that path. Based on the triggers for that error, I see the following possibilities:
      - Target path does not exist (but if you uploaded a different file type, then it probably does)
      - Target path is not writable (file permissions)
      - Target path's disk is full or does not have enough space left to write the file (this is possible, especially if you have partitioned the hard drive, and have not placed the wiki attachment directory in a large data partition).
      - Target path uses a stream wrapper instead of an absolute path (doesn't appear to be the case here)
      - Unable to get an exclusive file system lock on the target path
      - The source upload file disappeared from disk before it could be written to the target path (don't think I've ever seen this happen, but possibly it's related to a problem in the Imagick implementation, see below)

      As for the 502 and underlying errors:

      In VaultWiki we have hardcoded a time limit of 5 seconds for processing a user upload via Imagick, in order to protect you when a botnet tries to upload 100 files at once and possibly freeze your server. This limit was added because Imagick is designed in such a way that it is vulnerable to image bombs (small image files that can inflate to millions times memory and/or time usage) and other security holes.

      When added to the 1 second connection limit and the 3 second transfer limit, this results in 8-10 seconds of time allotment per image uploaded.

      You can work around this issue by reducing the dimensions of the image you are uploading before you upload it.

      OR

      While we do include support for Imagick, it is only because of vBulletin's native support. We STRONGLY recommend disabling vBulletin's Imagick support on your site, as well as disabling permission for user uploads of avatars, as well as some other user image types that might let users upload images from a remote server. Also disable vBulletin's options to automatically resize uploaded images that are too large.

      As we reported to vBulletin developers in late 2017, which led to them ending support for vBulletin 4 that quarter, their implementation of Imagick and some of these other image features even without Imagick contains security holes, most notably against image bombs and slow-loris type attacks, and should not be used in public without major changes. We successfully performed such attacks against our own test sites so we knew they were viable.
      Reply Reply  
    3. September 28, 2021 2:45 AM
      pegasus pegasus is offline
      VaultWiki Team
      This is fixed in the next release.

      Basically if the final directory where the uploaded image was going to be moved did not exist yet, this error would be thrown when trying to move it.

      This was not unique to Imagick configurations. It was occurring rarely in our tests because our tests contain test data (including test directories), and this error would only occur if it came up with a test directory that did not exist yet. If you upgraded from 4.0.x, then you possibly had some directories already.

      There were some related quirks:
      - Immediately after uploading an image, if the image gets moved, the thumbnails fail to generate and the image gets changed to a regular file.
      - Immediately after uploading an image, the thumbnails that do get created are instantly deleted.
      These are also fixed in the next release.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 3:29 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.