Issue with File Action queue not deleting files

sukhman21

Member
YetiShare User
Jan 26, 2015
498
1
18
#1
Hello,

I am having issues with file action where the script wont delete the expired files. I have set it to remove files after 24 hours of them expiring and i have triple checked the cron jobs are setup correctly and even ran the cron manually but still nogo.

The files do go into the _deleted folder so upto that part it works fine but it wont actually delete from the deleted folder after 24 hours.

Second issue: for the thumbnails / video converter images, they all get stored on the main server and when there is a file_action to delete those thumbnails (because the video expired), the path of the video file will be fine and the video goes to _deleted folder in that fileserver (it still wont get deleted after 24 hours) but the thumbnail path would show the path on the fileserver and the fileserver column shows "local default" and it fails to delete it because the path is of a fileserver and no thumbnail exist on fileserver because they are all on the main server.

this used to work fine but ever since i got the fileservers, it does not work anymore.
I did check the config file and all the parameters are setup correctly. the fileservers work fine otherwise, i am able to upload / download / delete files manually except for these 2 issues -- files wont delete after 24 hours and thumbnail path is incorrect.

Any ideas :)
Thanks
 

paypal1352

New Member
YetiShare User
Wurlie User
Mar 2, 2012
297
0
0
#2
Since you can delete manually, I could be wrong, but this sounds like theres a limitation somewhere, maybe check that shell_exec is not disabled
 

adam

Administrator
Staff member
Dec 5, 2009
1,577
10
38
mfscripts.com
WEBSITE
https://yetishare.com
LOCATION
UK
#3
Hi,

Do you have the file servers setup with the cron tasks aswell? 2 of them need to exist on any external file servers:

https://support.mfscripts.com/public/kb_view/26/

Also, are they being processed (or attempted to be processed) or just staying in the pending state?

Thanks,
Adam.
 

sukhman21

Member
YetiShare User
Jan 26, 2015
498
1
18
#4
paypal1352 said:
Since you can delete manually, I could be wrong, but this sounds like theres a limitation somewhere, maybe check that shell_exec is not disabled
Manually deleting, i mean using the rm command. Manually running the cron still wont delete the files. I dont get any error.

Also, i have mediaconverter in the same cron list and mediaconverter works fine no issues. I have another wordpress site on the same server and cron on that website works fine as well.



adam said:
Hi,

Do you have the file servers setup with the cron tasks aswell? 2 of them need to exist on any external file servers:

https://support.mfscripts.com/public/kb_view/26/

Also, are they being processed (or attempted to be processed) or just staying in the pending state?

Thanks,
Adam.
Adam,
Crons stay in pending state. I know the cron jobs are running fine on the server as mediaconverter works fine, archive manager works fine, Also my other wordpress site cron is working fine on the same server.
If you look in the screenshot, the server shows "Local Default" but the path shows for a fileserver. I know this file does not exist on a fileserver, it is on the main server so this task#2 will fail. The first cron task looks good but it will stay in pending state and wont fail or complete. The screenshot is for the future timestamps but i know the task#2 and 4 will fail and task#1 and 3 will stay pending



Can you confirm what values in the config.php file we should be using, i think i have them correct but just wanted to verify them with you.
/* main configuration file for script */
define("_CONFIG_SITE_HOST_URL", "fs1.website.com");
define("_CONFIG_SITE_FULL_URL", "fs1.website.com");
/* set these to the main site host if you're using direct web server uploads/downloads to remote servers */
define("_CONFIG_CORE_SITE_HOST_URL", "www.website.com");
define("_CONFIG_CORE_SITE_FULL_URL", "www.website.com");


Thanks for your time on this guys.!!
 

sukhman21

Member
YetiShare User
Jan 26, 2015
498
1
18
#5
any clues on this Adam ? this one is still outstanding and i cant seem to figure this out. Its getting harder to manually delete files from every fileserver.
The files are moving to _deleted folder but they are not getting deleted from there.
Cron task is running fine on main server and fileservers but files are not getting deleted and action queue stays at pending. There are files that should have been deleted last week but are still pending.....
 

enricodias4654

New Member
YetiShare User
Jan 13, 2015
411
0
0
#6
Regardless of this issue, the script often leaves files in the _tmp and _deleted folder. Even in normal conditions if the php script dies in the middle of the process it can update the database and fail to remove the file on disk. This can also happen during an upload. Since the script doesn't use transactions the files will remain on those folders forever.

To mitigate this issue I use a cron in all servers that deletes files older than 3 days in those folders:

find httpdocs/files/_tmp/* -type f -mtime +3 -delete
find httpdocs/files/_deleted/* -type f -mtime +3 -delete
 

sukhman21

Member
YetiShare User
Jan 26, 2015
498
1
18
#7
yea i figured the files are left in the _tmp folder all the time. I do have a script in place to delete the files after 2 days from the _deleted folder. The bigger problem is removing the video screenshot (that gets generated by mediaconverter plugin) after the video has been deleted from the server. I have been manually deleting it. Hopefully its fixed in v4.4