News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Cron job failing

Started by DylanStr, 16.06.2016 10:38:55

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DylanStr

Hello all,

My cronjob seems to keep failing if i check the day after. The cron job gives an error and keeps on getting ''unpublished''.
What can it be? I'm using XTCronjobs as suggested in the documention written by Colin.

I copied the link from the ''Check download area now'' button so it includes my secret key so that must be good. Please refer to the screenshots attached to see the problem and the settings i use.

Best regards, Dylan

[gelöscht durch Administrator]
  •  

ColinM

Hi
I think that the php on your site might not allow you fopen so check with your hosting service (it was not allowed on my site originally many years ago!)
Colin
Colin M
  •  

DylanStr

Hi Colin,

I am hosting the site myself on a virtual server running Centos7. So I basicly just installed the LAMP stack and created my website. So what could it be?

Please see the attachment for the error.

Best regards,

Dylan

[gelöscht durch Administrator]
  •  

ColinM

Dylan,
seems to me that the  XTCronjob is not quite compatible with your set up.
To test please could you ensure that auto monitoring is off. Next load up a few files and directories into the jdownloads directory area as usual.  Then run the scan manually from the jD control page- Status tab and click on "Check Download area now.".  This should run the scan process AOK.  If it does then it is the XTCronjob.

In your environment you could probably set up a real cron job :) :D

Colin
Colin M
  •  

DylanStr

#4
Quote from: ColinM on 17.06.2016 19:28:00
Dylan,
seems to me that the  XTCronjob is not quite compatible with your set up.
To test please could you ensure that auto monitoring is off. Next load up a few files and directories into the jdownloads directory area as usual.  Then run the scan manually from the jD control page- Status tab and click on "Check Download area now.".  This should run the scan process AOK.  If it does then it is the XTCronjob.

In your environment you could probably set up a real cron job :) :D

Colin
Auto monitoring is off. I uploaded a test file in the directory as i would normally do, clicked on "Check Download area now." The scan  took like 40 minutes, pretty long! But it uploaded the file as it should. See the attachment for the return message from the scan. It doesnt say completed, but it is completed because it is no longer using CPU resources. (i monitored it during the scan process, it was 100% all the time than went to 0% and the file was added.) But i thought the return message should say Scan completed, files added etc. right?

Maybe there is a problem there?

Best regards,

Dylan

ps: Does adding more CPU cores would make the scan go faster? I think 40 minutes is a bit too long isnt it? I am running 1 core and can easily  add more because i am on virtualization.

[gelöscht durch Administrator]
  •  

ColinM

#5
Dylan,
I am not surprised that examining 26413 downloads takes a very noticeable time on the setup you have.  It is an intensive database access activity so with it being a virtual m/c on the same PC as the database it will take time.  Adding more cpu power might help but I suspect a solid state disk would enhance the situation.

You should have got a report as shown in the attached pic, which is from one of my test sites running on XAMPP.  If I linearly scale the time on my PC, which is multi-core, then I would expect a time of around 13 to 14 minutes.  Suggest you repeat but let it run overnight!!

There is also a small problem with the number of Downloads reported in your status panel.  At one place it reports 26,143 and earlier it reports just 26.  The (int) cast, which is being used in the code, will terminate at the comma so 26,143 will be returned as 26. The same happens with the intval() function.  I will report this as a separate little bug.

Colin

[gelöscht durch Administrator]
Colin M
  •  

DylanStr

#6
Yes I just knew there was something wrong with the report. Suddenly my report changed to the one I have shown in the attachment earlier. Maybe I need to start fresh, and reinstall jDownloads. But it will be a pain because I changed all the layouts (I deleted a lot of code to make  more basic layouts). Is there an option to start with zero downloads and keep the rest of my settings/layouts?

I added 3 more cores so 4 cores in total, but it didnt matter, only 1 core was utilized during the scan. And I keep on getting these reports without all the information, but it does complete the scan... very weird. The window is fully white during the scan, when the scan stops it gives that report. (see attachment).

edit: Ok i tried another way to setup a cron, but it gives the same output as XTCronjob. I will let it run this night aswell to see if it actually works with adding a test file. Ill report back tomorrow.

[gelöscht durch Administrator]
  •  

ColinM

Dylan
Are you aware that you can export layouts and re-import them?
Soon we will be setting up a library of layouts serving different needs.  Depends on being able to import jdownloads-custom.css as some times a new layout requies updated css.  I have some compact ones, support of scrolling, better inline in articles, and so on.

Yes a restart might be a cleaner solution.  But before you do could you please check the Permissions to see that they have propagated.  It seems that this might be a troublesome aspect because of the way Joomla! needs a Save on the permissions.  Arno is working on a tool to aid.

If you do reload then I would suggest you feed in the downloads say a 1000 at a time rather than the whole lot.

Colin

[gelöscht durch Administrator]
Colin M
  •  

DylanStr

#8
Quote from: ColinM on 21.06.2016 10:30:42
Dylan
Are you aware that you can export layouts and re-import them?
Soon we will be setting up a library of layouts serving different needs.  Depends on being able to import jdownloads-custom.css as some times a new layout requies updated css.  I have some compact ones, support of scrolling, better inline in articles, and so on.

Yes a restart might be a cleaner solution.  But before you do could you please check the Permissions to see that they have propagated.  It seems that this might be a troublesome aspect because of the way Joomla! needs a Save on the permissions.  Arno is working on a tool to aid.

If you do reload then I would suggest you feed in the downloads say a 1000 at a time rather than the whole lot.

Colin

Thanks for the tip. But there isnt a way to delete all downloads? It would be nice to have. Or let's say, completely remove a catogory and all downloads within it.

Not sure what you mean about the permissions, I didnt change anything there, it is all default and works ok. The new way to cronjob i just found out seems to do ok, I run the cronjob as user Apache and it seems to be better than XTCronjob which always failed.
  •  

ColinM

Dylan
Quote
The new way to cronjob i just found out seems to do ok, I run the cronjob as user Apache and it seems to be better than XTCronjob which always failed.
Could ypu maybe send me details of how you set it up so I can add to docs please.

Also could you put your suggestion as a separate topic in the Suggestions section - we do look at them!
Colin
Colin M
  •  

DylanStr

I have send you a message :)
Sounds like a good idea to post it in suggestions, thanks!
  •