PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
scorpious
Worker
Worker


Joined: Dec 03, 2005
Posts: 148
Location: West Midlands. United Kingdom

PostPosted: Fri Jan 27, 2012 5:46 am Reply with quote Back to top

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
View user's profile Send private message Yahoo Messenger
killing-hours
RavenNuke(tm) Development Team


Joined: Oct 01, 2010
Posts: 415
Location: Houston, Tx

PostPosted: Fri Jan 27, 2012 9:16 am Reply with quote Back to top

Here is a link I've found that might help to narrow your search down a little bit.
Only registered users can see links on this board!
Get registered or login to the forums!


You might possibly have a script that is using more resources than are allocated to mysql.

also..
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message
fkelly
Moderator


Joined: Aug 30, 2005
Posts: 3186
Location: near Albany NY

PostPosted: Fri Jan 27, 2012 9:37 am Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
killing-hours
RavenNuke(tm) Development Team


Joined: Oct 01, 2010
Posts: 415
Location: Houston, Tx

PostPosted: Fri Jan 27, 2012 9:43 am Reply with quote Back to top

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
Only registered users can see links on this board!
Get registered or login to the forums!


Or it could just be left in bytes without converting.
View user's profile Send private message
fkelly
Moderator


Joined: Aug 30, 2005
Posts: 3186
Location: near Albany NY

PostPosted: Fri Jan 27, 2012 9:46 am Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
killing-hours
RavenNuke(tm) Development Team


Joined: Oct 01, 2010
Posts: 415
Location: Houston, Tx

PostPosted: Fri Jan 27, 2012 9:50 am Reply with quote Back to top

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.
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Fri Jan 27, 2012 9:52 am Reply with quote Back to top

scorpious, ask your host about the "MySQL server has gone away" errors. What version of mysql is running on your server?
View user's profile Send private message
scorpious
Worker
Worker


Joined: Dec 03, 2005
Posts: 148
Location: West Midlands. United Kingdom

PostPosted: Fri Jan 27, 2012 9:53 am Reply with quote Back to top

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 to the forums!


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
View user's profile Send private message Yahoo Messenger
killing-hours
RavenNuke(tm) Development Team


Joined: Oct 01, 2010
Posts: 415
Location: Houston, Tx

PostPosted: Fri Jan 27, 2012 10:03 am Reply with quote Back to top

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?
View user's profile Send private message
fkelly
Moderator


Joined: Aug 30, 2005
Posts: 3186
Location: near Albany NY

PostPosted: Fri Jan 27, 2012 10:05 am Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Fri Jan 27, 2012 10:15 am Reply with quote Back to top

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.
View user's profile Send private message
scorpious
Worker
Worker


Joined: Dec 03, 2005
Posts: 148
Location: West Midlands. United Kingdom

PostPosted: Fri Jan 27, 2012 10:47 am Reply with quote Back to top

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 to the forums!


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
View user's profile Send private message Yahoo Messenger
killing-hours
RavenNuke(tm) Development Team


Joined: Oct 01, 2010
Posts: 415
Location: Houston, Tx

PostPosted: Fri Jan 27, 2012 10:53 am Reply with quote Back to top

nuke_wiw_m = "who is where" table.

Start by looking at the who is where module/block and the table in the database.
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Fri Jan 27, 2012 11:36 am Reply with quote Back to top

scorpious, what version of RN are you both running?

We could try replacing "TYPE=memory" with "ENGINE=memory".
View user's profile Send private message
scorpious
Worker
Worker


Joined: Dec 03, 2005
Posts: 148
Location: West Midlands. United Kingdom

PostPosted: Fri Jan 27, 2012 1:12 pm Reply with quote Back to top

Hi Palbin

RN Version rn2.40.01

Scorp
View user's profile Send private message Yahoo Messenger
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Fri Jan 27, 2012 5:09 pm Reply with quote Back to top

At this point I think we need to wait for your host to response and see what they say.
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Sat Jan 28, 2012 3:57 am Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum