Author |
Message |
scorpious
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Dec 03, 2005
Posts: 153
|
Posted:
Fri Jan 27, 2012 5:46 am |
|
Hi All
Within the rnlogs we have the following errors:
January 4, 2012, 9:12 am 2006 : MySQL server has gone away ( alot of these. )
SQL was: CREATE TABLE nuke_wiw_m (who VARCHAR(20), mn VARCHAR(20)) TYPE=memory
remote addr: 65.52.109.152
are these standard errors ?
The reason why I ask is, our CPU usage as been very high, its normally between 1.2 to 2.3 usage, however, since October last year its usage on afew occassion as been as high as 12.3, so we started to check the rnlogs and noticed the above errors.
Cheers
Scorp |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
killing-hours
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/18f54b284d120ece8c103.gif)
Joined: Oct 01, 2010
Posts: 438
Location: Houston, Tx
|
Posted:
Fri Jan 27, 2012 9:16 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
fkelly
Former Moderator in Good Standing
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY
|
Posted:
Fri Jan 27, 2012 9:37 am |
|
We need to clean up the rnlogging process to avoid outputting multiple lines when the MYSQL server goes away. We need something in the ACP that checks the size of the dblog and truncates it (with a warning to the admin) when it gets above a predetermined size. Probably need a administration application to appear on the ACP for logging. I was even thinking that we could have different icons for the log, with a fat little one bursting at the seams when the log gets big. Just not enough hours in the day. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
killing-hours
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jan 27, 2012 9:43 am |
|
Couldn't that be done with a simple file size check and an if/then statement with a little css to make it all look good?
Something like....
Code:function _format_bytes($a_bytes)
{
if ($a_bytes < 1024) {
return $a_bytes .' B';
} elseif ($a_bytes < 1048576) {
return round($a_bytes / 1024, 2) .' KiB';
} elseif ($a_bytes < 1073741824) {
return round($a_bytes / 1048576, 2) . ' MiB';
} elseif ($a_bytes < 1099511627776) {
return round($a_bytes / 1073741824, 2) . ' GiB';
} elseif ($a_bytes < 1125899906842624) {
return round($a_bytes / 1099511627776, 2) .' TiB';
} elseif ($a_bytes < 1152921504606846976) {
return round($a_bytes / 1125899906842624, 2) .' PiB';
} elseif ($a_bytes < 1180591620717411303424) {
return round($a_bytes / 1152921504606846976, 2) .' EiB';
} elseif ($a_bytes < 1208925819614629174706176) {
return round($a_bytes / 1180591620717411303424, 2) .' ZiB';
} else {
return round($a_bytes / 1208925819614629174706176, 2) .' YiB';
}
}
$error_log_size = _format_bytes(filesize(error_log))
|
The format function pulled from
http://www.php.net/manual/en/function.filesize.php
Or it could just be left in bytes without converting. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
fkelly
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jan 27, 2012 9:46 am |
|
Determining the file size could be done that way. Wrapping it all up in an admin application would take a bit more work. Feel free to take it on ...
For now we just have to emphasize (as we do in the comments in rnconfig) to administrators that if they are going to use the dblogging tool they have to monitor it regularly. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
killing-hours
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jan 27, 2012 9:50 am |
|
What do you propose is a good threshold for the size? I've never really given it any thought... but doesn't seem like it's something major and gives me a good opportunity to play with mantis. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
Site Admin
![](modules/Forums/images/avatars/Dilbert/Dilbert_-_Dogbert_King.gif)
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Fri Jan 27, 2012 9:52 am |
|
scorpious, ask your host about the "MySQL server has gone away" errors. What version of mysql is running on your server? |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
scorpious
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jan 27, 2012 9:53 am |
|
Hi Killing-hours
Cheers for the reply
Before posting here, I tent to search Google and last night I spent over 3 hours searching, however, I did not find any decent explainations.
First search was at Mysql
Second search, I am sure this is what I typed in Google
Only registered users can see links on this board! Get registered or login!
so, as I asked before, are these standard errors ?
A simple yes or no would suffice, as we are trying to track down why the CPU Usage could go that high as I said in my first post.
Cheers
Scorp |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
killing-hours
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jan 27, 2012 10:03 am |
|
scorpious, I wasn't try to be rude or imply you didn't search, but from the 5 minutes worth of searching I did on the matter I found out pretty quick that it "appears" to be a resource problem (I.e. not enough resources are allocated to mysql ORRRRRRRRR a script is throwing to much information to the db).
that's not saying it's your exact problem... but it seems this warning is more difficult to track down rather than saying "yep... it's precisely this or that".
Did you change anythign in October of last year or did the host change anything? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
fkelly
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jan 27, 2012 10:05 am |
|
Re. appropriate size ... I don't know exactly. Perhaps what we ought to try is just manually keep boosting the size of a text file till we reach the limits on what CPANEL will edit. I reached it with my .htaccess file the other day when I was adding IP's to ban from the countries table. I think I had 80k lines or something a bit more than that and the file size was getting up towards 2 megs. Probably 100k? Since we set parameters in rnconfig there could be a default file size (say 100k) with the option for an admin to boost it.
For the logging process itself, if possible when we write the log messages out we should look at the previous one. If it is a mysql server has gone away message and on the same day and near the same time, we probably don't need two of them. The site won't be working anyway but every time someone clicks on something and tries to load a page they are going to generate 100 plus such errors. It adds up and is unnecessary.
Yes, it would be a good opportunity Killing. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jan 27, 2012 10:15 am |
|
Guys please do not highjack a topic.
scorpious, are you hosting your own site or have you purchased a hosting plan? If you have purchased a plan through a hosting company you need to ask them about the DB dropping connections. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
scorpious
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jan 27, 2012 10:47 am |
|
Hi Palbin
Mysql version is 5.0
Its a purchased hosting plan
We have put a support ticket in, see what they have to say.
This site is not mine, its belongs to a good friend of mine who runs it.
Only registered users can see links on this board! Get registered or login!
We both are on the same hosting provider and as I have not seen errors like that in my logs I was wondering what may have caused them.
His site has been disabled twice for High CPU usage, we have asked the provider what could be causing this and all they replied with was, it seams to becoming from Modules, they was unable to say which file or script. Thats when I started to view the Rnlogs.
Cheers Scorp |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
killing-hours
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jan 27, 2012 10:53 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jan 27, 2012 11:36 am |
|
scorpious, what version of RN are you both running?
We could try replacing "TYPE=memory" with "ENGINE=memory". |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
scorpious
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jan 27, 2012 1:12 pm |
|
Hi Palbin
RN Version rn2.40.01
Scorp |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jan 27, 2012 5:09 pm |
|
At this point I think we need to wait for your host to response and see what they say. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Sat Jan 28, 2012 3:57 am |
|
I believe this table uses mySQL's heap memory and isn't a physical table per se so it's possible your host has some restriction on the amount of memory MySQL can use and this causes the 'gone away' error when the account goes over its allotted limit.
Personally I don't use and remove it because I can see who's online, I don't need to know exactly where. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|