|
Re:Recount Categories Stats ERROR 8 Months, 1 Week ago
|
|
|
Hazzaa wrote:
Quick question sumbus, If not a server or configuration issue, then why is it that the majority of FB users are able to accomplish a recount?
Because users who have upgraded from 1.0.1 to 1.0.4, which have altered the files using patches present in the forum and make many changes in the forum, are very few!
Above was mentioned by the original poster that he is getting a 30 second time out even though he set is time_out to 3000. (OH Wait does the php.ini count in seconds or milliseconds) Brain dead moment on my part.
php max_execution_limit is set in second.
If the user has set the limit to 3000 (50 minutes) has not resolved, is unquestionable sign that the problem is not on the server!
Not to mention you haven't even began to let us know if it's Joomla 1.0.? or 1.0.5, what components and modules you have, what server platform you're on (linux, Windows) etc... how the heck do you expect an answer?
Sorry, but someone who uses joomla and its components always know that they should always been updated, so it is obvious that I have everything to the latest version. However, joomla 1.0.15, 1.0.4 FB, CB 1.1
We begin by guessing different things that CAN/MAY effect your particular issue. From there we begin to narrow it down to something a little more tangible. If ALL else fails, I will jump into the code to see if I can find problems with the code and hopefully resolve it.
Sorry....
The problem is in this cicle.
[code:1][size=2]function reCountBoards() {
global $database;
include_once (JB_ABSSOURCESPATH . 'fb_db_iterator.class.php');
//reset all stats to 0
$database->setQuery("UPDATE `#__fb_categories` SET `id_last_msg`='0',`time_last_msg`='0',`numTopics`='0',`numPosts`='0'"«»);
$database->query();
$database->setQuery("select id, time, parent, catid from #__fb_messages order by id asc"«»);
$messages_iter = new fb_DB_Iterator($database);
$database->setQuery("select id, parent, numTopics, numPosts,id_last_msg, time_last_msg from #__fb_categories order by id asc"«»);
$cats = $database->loadObjectList();
foreach ($cats as $c) {
$ctg[$c->id] = $c;
}
$i=0;
while ($messages_iter->loadNextObject($l)) {
$i++;
//if($i==100) { die(); }
$cat_l = $l->catid;
while ($cat_l) {
if ($l->parent == 0) {
$ctg[$cat_l]->numTopics++;
}
else {
$ctg[$cat_l]->numPosts++;
}
$ctg[$cat_l]->id_last_msg = $l->id;
$ctg[$cat_l]->time_last_msg = $l->time;
$cat_l = $ctg[$cat_l]->parent;
}
}
// now back to db
foreach ($ctg as $cc) {
$database->setQuery(
"UPDATE `#__fb_categories` SET `time_last_msg`='" . $cc->time_last_msg . "',`id_last_msg`='" . $cc->id_last_msg . "',`numTopics`='" . $cc->numTopics . "',`numPosts`='" . $cc->numPosts . "' WHERE (`id`='" . $cc->id . "') "«»);
$database->query();
echo $database->getErrorMsg();
}
$messages_iter->Free();
}[/size][/code:1]
Errors are shown in these lines of code depending on the time set in max_execution_limit
[code:1][size=2]while ($cat_l) {
if ($l->parent == 0) {
$ctg[$cat_l]->numTopics++;
}
else {
$ctg[$cat_l]->numPosts++;
}
$ctg[$cat_l]->id_last_msg = $l->id;
$ctg[$cat_l]->time_last_msg = $l->time;
$cat_l = $ctg[$cat_l]->parent;
}[/size][/code:1]
If we have a low timeout (like 60 seconds) errors are here:
[code:1]$ctg[$cat_l]->numTopics++;[/code:1]
This is because of the number of posts and the speed of server
So, if we use a very hig timeout limit like 5-10 minutes, In most cases, the error comes from this line of code:
[code:1]$ctg[$cat_l]->time_last_msg = $l->time;[/code:1]
So i think the problem is in the script that take the "time" of posts...or similar!
[quote]P.S Have a GREAT day :) [/quote]
Thank you, but my site (joomla contents + forum topics) has about 40,000 hits per day ... So I must be very reactive in these cases! And now the forum works, but does not show the counts, so it seems very empty!
|
|
|
Logged
|
|
|
Last Edit: 2008/03/16 22:34 By simbus82.
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Recount Categories Stats ERROR 8 Months, 1 Week ago
|
|
|
grumblemarc wrote:
Well someone pick a thread 'cause ONE of them is getting deleted.
Sorry.... ok!
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Recount Categories Stats ERROR 8 Months, 1 Week ago
|
|
|
simbus82 wrote:
my site (joomla contents + forum topics) has about 40,000 hits per day [/quote]
This in itself tells me more than the others have stated in everything they have mentioned having to do with errors.
Another thing, you mentioned you are using J1.0.15. Did you have these issues before going to J1.0.15
You upgraded from FB 1.01 to 1.04, are you sure complete table structure went in correctly?
I Posted a reply to someone, to uninstall FB1.04 and reinstall. If you did an upgrade rather than a full install, you may want to attempt this. Uninstall FB and make a backup of ALL images, smilies, avatars and files your members may have uploaded. Doing an uninstall does NOT effect your table structure but you may want to back that up as well JUST IN CASE.
Download the FULL FB1.04 install and reinstall FB.
I have noticed that many who do the upgrade rather than the full install seem to run into issues that are VERY unfamiliar to me.
Again ALL the above suggestions are MY way of trouble shooting. I am just asking BASIC questions so that I have a better understanding of YOUR situation.
|
|
|
Logged
|
|
Wise men talk because they have something to say.
Fools talk because they have to say something.
***Plato***
joomlame.com
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Recount Categories Stats ERROR 8 Months, 1 Week ago
|
|
|
php max_execution_limit is set in second.
If the user has set the limit to 3000 (50 minutes) has not resolved, is unquestionable sign that the problem is not on the server!
The previous user is still timing out at 30 seconds. Since he is using a home server, chances are he has a Windows platform and if using IIS, then IIS will over ride the php.ini settengs.
I banged my head for over a month trying to figure that one out. Even after making my ini set to 0 which gives unlimited script run time.
|
|
|
Logged
|
|
Wise men talk because they have something to say.
Fools talk because they have to say something.
***Plato***
joomlame.com
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Recount Categories Stats ERROR 8 Months, 1 Week ago
|
|
|
Hazzaa wrote:
This in itself tells me more than the others have stated in everything they have mentioned having to do with errors.
Another thing, you mentioned you are using J1.0.15. Did you have these issues before going to J1.0.15
You upgraded from FB 1.01 to 1.04, are you sure complete table structure went in correctly?
I Posted a reply to someone, to uninstall FB1.04 and reinstall. If you did an upgrade rather than a full install, you may want to attempt this. Uninstall FB and make a backup of ALL images, smilies, avatars and files your members may have uploaded. Doing an uninstall does NOT effect your table structure but you may want to back that up as well JUST IN CASE.
Download the FULL FB1.04 install and reinstall FB.
I have noticed that many who do the upgrade rather than the full install seem to run into issues that are VERY unfamiliar to me.
Again ALL the above suggestions are MY way of trouble shooting. I am just asking BASIC questions so that I have a better understanding of YOUR situation.
Thanks for this suggestion...
But i have used "recount" many time in this days (i'm going to "reordering" forum categories), every time ok!...but last time, without any modification of all systems, recount give me this problem!
I will try to "reinstall" all!
|
|
|
Logged
|
|
|
Last Edit: 2008/03/16 23:04 By simbus82.
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Recount Categories Stats ERROR 8 Months, 1 Week ago
|
|
Hazzaa wrote:
php max_execution_limit is set in second.
If the user has set the limit to 3000 (50 minutes) has not resolved, is unquestionable sign that the problem is not on the server!
The previous user is still timing out at 30 seconds. Since he is using a home server, chances are he has a Windows platform and if using IIS, then IIS will over ride the php.ini settengs.
I banged my head for over a month trying to figure that one out. Even after making my ini set to 0 which gives unlimited script run time.
Ah, ok....
I have tried 720 seconds, timeout! I have a very fast VPS with apache....
I try now 3600, so i can see if in one hour the script car recount al of my forum (..only 10.000 post...  ...is a little number!)
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Recount Categories Stats ERROR 8 Months, 1 Week ago
|
|
|
OK I'm not quite understanding. It recounted for you and gave you a total of 10,000?
Gan you supply a link to your site please.
Also here are a couple of thing to consider.
If your forum is THAT busy and people ARE always there, could it be a combination of the two creating the havoc on your server. Attempt this. Shut down your Joomla site for 5 minutes, run the script and see what happens.
As you can see, in your case there are MANY variables that CAN be causing the issue.
|
|
|
Logged
|
|
Wise men talk because they have something to say.
Fools talk because they have to say something.
***Plato***
joomlame.com
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Recount Categories Stats ERROR 8 Months, 1 Week ago
|
|
Hazzaa wrote:
OK I'm not quite understanding. It recounted for you and gave you a total of 10,000?
Gan you supply a link to your site please.
Sorry my english is...ehm....
I know that my forum has about 10.000 in it!
So, i know that the recount script cannot take a long time to recount all categories!
Also here are a couple of thing to consider.
If your forum is THAT busy and people ARE always there, could it be a combination of the two creating the havoc on your server. Attempt this. Shut down your Joomla site for 5 minutes, run the script and see what happens.
No, not simultaneous! 40.000 "hits" for day, not single visits!
Normally I have about 10-15 visitors (registered and guest) at same time!
As you can see, in your case there are MANY variables that CAN be causing the issue.
i know i know! 
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Recount Categories Stats ERROR 8 Months, 1 Week ago
|
|
|
Have you tried reinstalling like I suggested?
|
|
|
Logged
|
|
Wise men talk because they have something to say.
Fools talk because they have to say something.
***Plato***
joomlame.com
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Recount Categories Stats ERROR 8 Months, 1 Week ago
|
|
|
having the same issue here...reinstall did nothing. CPU gets pegged at 100% and max_exectution_time in php.ini is set to 5000 and still bombs eventually. 27 categories, 662 topics, 5500+ members, 4337 replies.
i wonder if it's hitting a memory limit as well?
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|