The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Issues with excessive CPU usage continue...
Hi Everyone,
We recently received some help with the my.cnf file from vB.com and this did seem to help alot, but still we have a lingering issue. Previously we had to restart the site everyday to keep things running, now its more like every 6 - 10 days. We've not been able to isolate what is causing the excess CPU usage. I recently installed a proper firewall on the server so I am now receiving email messages which are much more revealing. Here is a typical email that starts 6 - 10 days after a reboot. Quote:
How can I isolate which cron job? I am willing to pay someone to fix this problem. Thanks in advance for any advice |
#2
|
||||
|
||||
Is there no time stamp in the log? Just match it with your cron tasks. Chances are it is something major like a database back up or sitemap gen, something like that.
|
#3
|
|||
|
|||
If you're willing to pay someone to figure it out, you should post a request in the Request for Paid Services forum.
If you're feeling adventurous, you could try editing your includes/functions_cron.php file like this (find this section near the end and replace it with this): PHP Code:
then after a while you hopefully can look at cronlog.txt and find the tasks that aren't ending. Of course you'll still have to figure out why, but at least you'll know where to look. |
#4
|
||||
|
||||
Go through all your scheduled tasks, turning off those you feel you don't need. See if that helps.
If not and ff you can do without the scheduled tasks completely, turn them off one at a time for a few days until you find the one causing the issue. |
#5
|
||||
|
||||
I find it odd there is no timestamp on the errors. If you can get the errors to print with a timestamp, then you can take a look at your Scheduled Tasks and see which one(s) correspond with that timestamp.
|
#6
|
|||
|
|||
ok Thank you all for your replies, I have added the above script so I will post results when I get a few
What directory will I find cronlog.txt? Thanks again, Lisa |
#7
|
||||
|
||||
To turn them off go to: AdminCP > Scheduled Tasks > Scheduled Task Manager > then from controls on the right (drop down) of the tasks disable them.
|
#8
|
|||
|
|||
It should be in the main forum directory (the one with forum.php).
I made a change to the code after I posted it (I forgot that microtime() needed a parameter to return a number instead of string). So hopefully you copied the code after I made that change, or else the run times will be wrong. It may not matter though, because for the times you posted above it looks like you have things hanging around for days, so you should be able to see that without the run times. |
#9
|
|||
|
|||
Thank you KH99
I did just paste the info in a couple of hours ago. I've found the forum.php directory and there is only cron.php. I cant find the log file. Do I have to create an empty document? |
#10
|
|||
|
|||
Oh, yeah, I'm so used to doing stuff on my test forum that I didn't think of the fact that your web server user might not have permission to create files in that directory. So yeah, you could try creating the empty file.
Another option would be to change the path to somewhere (outside your html directory) where a file can be created. I really should have made the file path a variable, but I didn't so there's two places where it would need to be changed. It could also be that no scheduled tasks have run yet. For some reason it doesn't log if you use the "Run Now" button the Scheduled Task manager. I guess it uses different code to run the tasks. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|