[bd] Attachment Store [Paid] 1.3.0

Store attachment differently and more effectively.

  1. rsi

    rsi Webmaster

    Hi,

    The actual update tool is not creating any errors, it goes through all of the attachments and then finishes like normal. It's when I go to run the built-in xenforo 'Rebuild Attachment Thumbnails' tool is when I get the error below. I have to start it and then stop it real quick just so I can save the error below before the hosting company locks me out due to all of the failed connection attempts. That is the problem, if I try to run it they lock me out because it triggers a security event so it’s hard for me to just let it run because I know what will happen. I could try it, but I’m not sure it would even produce any dump. Where would I look for it? In my root directory?

    I get the same error below for each of the 2338 attachments and it says “Unable to connect to myolddomain.com:21”

    myolddomain.com is my old hostname connected to those 2338 attachments.

    Code:
    Error Info
    
    Thumb rebuild for #864: Unable to connect to myolddomain.com:21 - library/bdAttachmentStore/Model/File.php:315
    
    Stack Trace
    
    #0 /home/me/public_html/library/bdAttachmentStore/Model/File.php(381): bdAttachmentStore_Model_File->_ftp_connect(Array)
    
    #1 /home/me/public_html/library/bdAttachmentStore/Model/File.php(29): bdAttachmentStore_Model_File->_ftp_saveFile(Array, '/home/me/p...', '2014/04/864_bef...', 'NC-303_ANT_INPU...')
    
    #2 /home/me/public_html/library/bdAttachmentStore/XenForo/DataWriter/AttachmentData.php(133): bdAttachmentStore_Model_File->saveFile('ftp', Array, '/home/me/p...', '2014/04/864_bef...', 'NC-303_ANT_INPU...')
    
    #3 /home/me/public_html/library/NFLJ/AMS/XenForo/DataWriter/AttachmentData.php(48): bdAttachmentStore_XenForo_DataWriter_AttachmentData->_writeAttachmentFile('/home/me/p...', Array, true)
    
    #4 /home/me/public_html/library/bdAttachmentStore/XenForo/DataWriter/AttachmentData.php(145): NFLJ_AMS_XenForo_DataWriter_AttachmentData->_writeAttachmentFile('/home/me/p...', Array, true)
    
    #5 /home/me/public_html/library/XenForo/DataWriter/AttachmentData.php(167): bdAttachmentStore_XenForo_DataWriter_AttachmentData->_writeAttachmentFileData('\x89PNG\r\n\x1A\n\x00\x00\x00\rIHD...', Array, true)
    
    #6 /home/me/public_html/library/bdAttachmentStore/XenForo/DataWriter/AttachmentData.php(55): XenForo_DataWriter_AttachmentData->_postSave()
    
    #7 /home/me/public_html/library/XenForo/DataWriter.php(1423): bdAttachmentStore_XenForo_DataWriter_AttachmentData->_postSave()
    
    #8 /home/me/public_html/library/XenForo/Deferred/AttachmentThumb.php(67): XenForo_DataWriter->save()
    
    #9 /home/me/public_html/library/bdAttachmentStore/XenForo/Deferred/AttachmentThumb.php(11): XenForo_Deferred_AttachmentThumb->execute(Array, Array, 7.99999809265, '')
    
    #10 /home/me/public_html/library/XenForo/Model/Deferred.php(295): bdAttachmentStore_XenForo_Deferred_AttachmentThumb->execute(Array, Array, 7.99999809265, '')
    
    #11 /home/me/public_html/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.99999809265, '', false)
    
    #12 /home/me/public_html/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
    
    #13 /home/me/public_html/library/XenForo/ControllerAdmin/Tools.php(159): XenForo_Model_Deferred->run(true, NULL, '', false)
    
    #14 /home/me/public_html/library/XenForo/FrontController.php(351): XenForo_ControllerAdmin_Tools->actionRunDeferred()
    
    #15 /home/me/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    
    #16 /home/me/public_html/admin.php(13): XenForo_FrontController->run()
    
    #17 {main}
    
    Request State
    
    Array
    
    (
    
      [url] => http://myolddomain.com/admin.php?tools/run-deferred
    
      [_GET] => Array
    
      (
    
      [tools/run-deferred] =>
    
      )
    
      [_POST] => Array
    
      (
    
      [redirect] => http://myolddomain.com/admin.php?tools/rebuild&success=1
    
      [execute] => 1
    
      [_xfToken] => ********
    
      )
    
    )
    
    
    .
     
  2. rsi

    rsi Webmaster

    I went ahead and tried to run the xenforo 'Rebuild Attachment Thumbnails' tool again and it pretty much wants to freeze when it tries to rebuild those 2338 attachments because there is a very long delay when it tries to connect to each one of them so I had to stop it. It would literally take forever and the hosting company will lock out my ip address because of the repeated connection attempts so I am unable to get a dump.

    Anyway, it still looks like it’s trying to use my old hostname to rebuild those 2338 attachments or less because not all of them are images and it produces the same error as in my last post. It rebuilds the other images ok until it gets to the ones with the old hostname. At least that’s what it looks like.
    .
     
  3. xfrocks

    xfrocks XenForo rocks! Staff Member

    Can you grab the record id 864 from xf_attachment_data for me?
     
  4. rsi

    rsi Webmaster

    I just sent it to you via a conversation message. Hopefully I exported it correctly using phpMyAdmin. If not let me know.
    .
     
  5. xfrocks

    xfrocks XenForo rocks! Staff Member

    Got it, thank you.
     
  6. rsi

    rsi Webmaster

    Hi,

    I finally made the update tool work.

    I had to uncheck the Maintain File Name and the Enforce Attachment Permission via Home>Options>Attachments, save it, then I ran the tool again. Then I went back and rechecked those boxes, saved it, and then ran the tool again.

    I don’t know which step made it work or which of the two checkboxes was the problem, but if I had to guess it's when I unchecked the Enforce Attachment Permission box and saved it and ran the tool the first time, but I could be wrong. In any event there seems to be some conflict with one of those two options or maybe both making the update tool not completely work. Those attachments I had though were originally uploaded with the Maintain File Name off so it could be that one as well.

    I’m wondering if you need to add those two checkbox options to the update tool?

    screenshot_1.jpg
    .
     
  7. rsi

    rsi Webmaster

    One last thing, the error below still pops up when doing the xenforo file heatlh check. I think this has already been brought up before, but when you release the next update you might want to correct it.

    I think also adding the Maintain File Name and the Enforce Attachment Permission checkboxes to the update tool may be a good idea as well because it was an issue, at least in my case it was.

    Thanks for you help...

    File_Health_Check.png
    .
     
    xfrocks likes this.
  8. xfrocks

    xfrocks XenForo rocks! Staff Member

    Interesting find. We will go through it again to find out what exactly happened. Of course, those checkboxes shouldn't affect the tool...
     
  9. thienbui

    thienbui New Member

    I can use Enforce Attachment Permission with this solution ?
     
  10. rsi

    rsi Webmaster

    One or both of those two checkboxes were somehow locking or preventing those SQL entries from being updated. That why it wasn't updating the hostname. I may or may not have uploaded those old attachments with one or both those boxes unchecked, but I think it was in fact a mixture. Some where and some were not.

    In any event, unchecking those boxes and running the tool and then rechecking them and doing it again is what unlocked them. I'm not sure if it was after the first step or the second step, but that it what did it.
    .
     
    xfrocks likes this.
  11. xfrocks

    xfrocks XenForo rocks! Staff Member

    Yes.
     
  12. vktechnology

    vktechnology New Member

    Hi
    It's bug
    When I delete post or attachment from Xenforo 1.5.11
    Attachment didn't delete
     
  13. xfrocks

    xfrocks XenForo rocks! Staff Member

    It takes some time before the files are actually deleted. Have you looked again? They should be deleted by now.
     
  14. vktechnology

    vktechnology New Member

    Hi

    I test with upload pictures and deleted post and wait for 3 hours and all files still in data/attachment-files/2016/12/
     
  15. vktechnology

    vktechnology New Member

    Hi
    all files are deleted now
    after 3 hours xx minutes

    My config is Store file in External Data directory

    I want to test again
    If i want to delete faster than 3 hours which file should i run ?
     
    xfrocks likes this.
  16. vktechnology

    vktechnology New Member

    Hi

    I got answer now how to delete fast
    After delete I go to run "Hourly Clean Up" and all files deleted
     
    xfrocks likes this.
  17. vktechnology

    vktechnology New Member

    Hi @xfrocks

    What I have to do to move large attachments ?

    1) I want to move 3 millions attachments about 2 TB size
    2) I use this option "Store file in External Data directory"
    3) Attachments on same HDD


    Do I have to just click Rebuild Now button ?

    on Rebuild Caches > Move Attachment Data


    Thanks
     
  18. xfrocks

    xfrocks XenForo rocks! Staff Member

    That's a lot of files, unfortunately there is no shortcut to do it quick since the files structure is changed and must be done together with db update to make sure it works correctly. The steps you stated are right, it should run quite fast because the add-on will do file moving (renaming) instead of copying.
     
    vktechnology likes this.
  19. xfrocks

    xfrocks XenForo rocks! Staff Member

  20. jordanr

    jordanr New Member

    Is there a way to have the views count be updated when attachments are stored on Amazon?
     
Loading...