Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-23-2017, 06:57 PM
ed762 ed762 is offline
 
Join Date: Sep 2014
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Attachments in File Upload Manager

Does anyone know which one of the scheduled task is responsible for cleaning attachments that are not used in the file upload manager? It looks whatever cron it is supposed to be does not work, so none of the attachment gets cleaned up.
Reply With Quote
  #2  
Old 08-23-2017, 07:03 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe /includes/cron/cleanup2.php around line 64 to 72.
Reply With Quote
  #3  
Old 08-24-2017, 06:06 PM
ed762 ed762 is offline
 
Join Date: Sep 2014
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find the lines. The cron ( Vb 4.2.3 ) is not working and images are still sitting in the file management even after 1 hour.

Does anyone know the reason why this is not working? Has anyone manually deleted the images that are no longer associated with any posts? How did you go about cleaning it up?
Reply With Quote
  #4  
Old 08-24-2017, 06:21 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is the refcount column value in the Filedata table 0 of said attachment(s)?
Reply With Quote
  #5  
Old 08-24-2017, 08:02 PM
ed762 ed762 is offline
 
Join Date: Sep 2014
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

None of the attachments have "0" in the refcount at all . Is that why the cron fail?
Reply With Quote
  #6  
Old 08-24-2017, 08:16 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes. refcount is the reference count (or the number of references to that attachment). It has a strict check of 0 against it, which is why it doesn't delete the attachments.
Reply With Quote
  #7  
Old 08-24-2017, 09:28 PM
Stingray27 Stingray27 is offline
 
Join Date: Jan 2006
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ed762 View Post
None of the attachments have "0" in the refcount at all . Is that why the cron fail?
Its not failing then, its doing its job.
Attachments with a ref count > 0 should never be deleted.
Reply With Quote
  #8  
Old 08-25-2017, 09:22 AM
ed762 ed762 is offline
 
Join Date: Sep 2014
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dave View Post
Yes. refcount is the reference count (or the number of references to that attachment). It has a strict check of 0 against it, which is why it doesn't delete the attachments.
Is this a bug within VB? because obviously there is a large number of images that are not in use by any threads.

Anyway to manually fix it?
Reply With Quote
  #9  
Old 08-25-2017, 11:52 AM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not aware of any bugs regarding attachments in the latest version of vBulletin.
Reply With Quote
  #10  
Old 08-25-2017, 11:52 AM
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Location: ZA
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ed762 View Post
Find the lines. The cron ( Vb 4.2.3 ) is not working and images are still sitting in the file management even after 1 hour.

Does anyone know the reason why this is not working? Has anyone manually deleted the images that are no longer associated with any posts? How did you go about cleaning it up?
Yes but it is obviously fraught with danger. You need to triple check everything and backup first.

I used the queries from this post: https://www.vbulletin.com/forum/foru...00#post3948600

There was a VBIV open for the failing cron cleanup, not sure if it was fixed in 4.2.3
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:06 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04788 seconds
  • Memory Usage 2,244KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete