Jump to content
Froxlor Forum
  • 0

Cron locked during AWStats generation


wurzelkind

Question

Hi,

 

ich recently migrated to froxlor and it is working great! The only problem i now got is that during AWStats generation the froxlor cronscript is locked and i receive many mails

 

"There is already a Cronjob in progress. Exiting..."

 

This is my fault because i changed the runtime for traffic counting manually. From then, the traffic was counted this (day-)hour every day. Now i got it back in the night but how can i solve the lockfile problem?

 

Does anybody have an Idea?

 

Thanks,

 

wurzelkind

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

Well, the settings say "Please, only change values here if you are *damn sure* you know what you are doing." - but that just aside.

 

Traffic calculation can take a long time if you have many domains and/or big access-logs. Of course, there is the 5-minute-intervall cronscript which then realizes that there is still the traffic-cronjob running. It's nothing bad it just doesn't work both at the same time.

 

The lockfile can be found in /var/lock/ (its got 'froxlor' in its name, so you should find it)

Link to comment
Share on other sites

Thanks for your fast reply!

 

If it is normal that Traffic counting locks the whole cronscript, wouldn't it be nice to split Traffic- and normal cronscipt as it was in SysCP? Or is there any reason why it has been combined?

It takes up to 1 hour every night. (There are a few archieved (.gz) logfiles, are they progressed, too?) When my Server needs 1 hour i can't believe that i'm the only one who receive mails about a locked cronscript (which runs every 5 minutes)?

 

Thanks,

 

Felix

Link to comment
Share on other sites

SysCP did the exact same thing. And no, old (archived) logs are not being processed.

 

Same setup on my machine, i never receive any emails, i think your cron is not setup correctly. What does your /etc/cron.d/froxlor file look like?

Link to comment
Share on other sites

The /etc/cron.d/froxlor file is (except MAILTO line) the one Froxlor Webinterface tells me to use

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=XXX@XXX

*/5 * * * *     root    /usr/bin/php5 -q /var/www/froxlor/scripts/froxlor_master_cronjob.php

 

But as i remember SysCP used it this way:

 

*/5 * * * *    root    /usr/bin/php5 -q /var/www/syscp/scripts/cron_tasks.php
0 0 * * *      root    /usr/bin/php5 -q /var/www/syscp/scripts/cron_traffic.php
[...]

 

Thanks,

 

Felix

Link to comment
Share on other sites

Hmm, because you said "SysCP did the exact same thing.", i just tried to show you that there were 2 different Cronjobs for tasks and traffic in SysCP.

But this will not help at all, if you tell me that it should work with ons script i believe you ;-)

 

I have nearly 150 MB of (noch archived) access logs in /var/kunden/logs/. Is this too much? Logrotate archives weekly, should i change it to daily?

Am i right that everybody whose traffic calculation takes more than 5 minutes, the next run of cronscript causes an e-mail because of the lockfile?

 

Thanks,

Felix

Link to comment
Share on other sites

Froxlor combined all the cronjobs so the admins (you) don't have to manage 10 lines of crontab-entries but rather manage them out of the panel.

 

Well, as webalizer/awstats only get the stats for one day, it sure would help to setup logrotate to rotate them daily.

 

The e-mailing stuff depends on the settings, if no root-entry is given in the aliases-file, then noone will receive them

Link to comment
Share on other sites

Okay, i'll try it with daily logrotate, thank you!

 

But about root entry in aliases you don't really mean that i should delete it? I think it is necessary to know if somethink is going wrong (for example i really like to get an e-mail if the cronscript hangs because of any other failure).

 

What log sizes does the others have? It would be nice if some other would post their sizes.

 

Thanks,

Felix

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...