cron on file server

cr33p

Member
YetiShare User
YetiShare Supporter
May 8, 2016
33
2
8
should i set cron jobs at file server ?
 

cr33p

Member
YetiShare User
YetiShare Supporter
May 8, 2016
33
2
8
set all crons but there is a lot of pending tasks, most of them deleting files.
cron running ok, i can see it in admin panel that crons are running
BUT, there is a lot of pendings, what's that ?
 

cr33p

Member
YetiShare User
YetiShare Supporter
May 8, 2016
33
2
8
how can i manually delete all pending tasks ?
want to do it and delete manually all files, just to double check
 

JawedAkhtar

New Member
Nov 13, 2020
13
3
3
set all crons but there is a lot of pending tasks, most of them deleting files.
cron running ok, i can see it in admin panel that crons are running
BUT, there is a lot of pendings, what's that ?
Try Waiting For 3 Or 4 Hours. If Files Aren't Being Deleted. Then Try Restarting Both Main And File Server Once. If It Doesn't Helps Then You'll Have To Manually Cancel It One By One.
After That Sanity Check Your Files. This Will Ensure Every File Stored Is Active In The Database Plus Clear Any Left Over Files Which Are No Longer Active And Should Have Been Removed.
 

cr33p

Member
YetiShare User
YetiShare Supporter
May 8, 2016
33
2
8
i run crons manually to check, and still nothing
deleted all files and cache manually now
just need to delete all pending tasks, it's impossible to delete it one by one, there is a lot of them
any info how can i delete it all ?
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
The cron script will only clear 100 at a time, so worth double checking the total count to see if it's decreasing. If you have a lot of entries it may take time to clear.

The actual items are in the "file_action" DB table. You can find any pending ones by running:
Code:
SELECT * FROM `file_action` WHERE `status` = 'pending' ORDER BY `status`;

Similarly you can delete them (for all servers) by running:
Code:
DELETE FROM `file_action` WHERE `status` = 'pending';

Although you'd be better getting the cron script working as you may be left with orphaned files on your servers.
 
  • Like
Reactions: cr33p

cr33p

Member
YetiShare User
YetiShare Supporter
May 8, 2016
33
2
8
after few hours cron looks like working, now only 23 left
i run cron manually, on both servers, but still, it's pending.
it's some kind of limit on script to cron jobs ?
i mean, for example we have 1000 pending tasks, crun running, how much tasks cron will make ?
all tasks is file delete (and thumb preview)
i just don't get it, why after i run cron manually there is nothing changed?
 

cr33p

Member
YetiShare User
YetiShare Supporter
May 8, 2016
33
2
8
ok deleted all pending tasks by sql query
DELETE FROM `file_action` WHERE `status` = 'pending';
all good
now, delete new uploaded files, run all cron from both servers. still nothing.
 

cr33p

Member
YetiShare User
YetiShare Supporter
May 8, 2016
33
2
8
not it's only "List Of File Actions (78 Pending)"
don't know why it's not running
 

cr33p

Member
YetiShare User
YetiShare Supporter
May 8, 2016
33
2
8
It should work manually via the cli, the same as via cron. I'm not sure why it would be different.


100 items are processed per cron run.
have sent you PM with logs, i think i get close to resolve the problem.
please take a look PM
 
  • Like
Reactions: adam