Home Private Messages Search
CPG Dragonfly™ CMS Dedicated Server & Bandwidth Sponsored by DedicatedNOW
Toggle Content
 
Forums ⇒ DragonflyCMS ⇒ Problems AFTER Install/Upgrade ⇒ MySQL server has gone away


MySQL server has gone away
Issues that happen after DragonflyCMS upgrade/install.
DO NOT post module installation issues here!

Go to page 1, 2  Next
Post new topic    Reply to topic    Printer Friendly Page     Forum Index ⇒  Problems AFTER Install/Upgrade

View previous topic :: View next topic  
Author Message
MajorHeadache
Supporter
Supporter

Offline Offline
Joined: Mar 05, 2005
Posts: 263
Location: My Little Pony Arena
PostPosted: Wed Jan 16, 2008 7:59 am
Post subject: MySQL server has gone away

Got this after upgrading from 9.0.6.1 to 9.1.2.1

I'm getting emails all day. During peak times, I might get 50 an hour, during slow times, I might get one / hour or less.

The messages are 99% like this:

Code::
On /Forums/viewforum/f=8.html
While executing query "SELECT g.group_id, g.group_name, g.group_single_user FROM moo_bbgroups AS g INNER JOIN moo_bbuser_group AS ug ON (ug.group_id=g.group_id AND ug.user_id=10 AND ug.user_pending=0)"

the following error occured: MySQL server has gone away

In: /home/mysite/public_html/includes/classes/cpg_member.php on line: 88

Guest information:
User id: 
Username: 
Admin: No
IP: 0.0.0.0
Host: 0.0.0.0 

Always that same query, always that same line of the same php file. The location changes. Also maybe worth noting, the IP and Host are always 0.0.0.0, even when the location is reading a private message, which indicates it's a member.

I have verified that during this time, MySQL server is indeed up and serving other sites on the box. It's running on the same box as the site too.

Rarely though, during one of these "outages", I will get an email that DOES have the host and IP correct, but the query and php file are different, for example:
Code::
On /Forums/viewforum/f=151.html
While executing query "SELECT * FROM moo_banner WHERE type='0' AND active='1' ORDER BY RAND() LIMIT 0,1"

the following error occured: MySQL server has gone away

In: /home/mysite/public_html/includes/functions/display.php on line: 326

Guest information:
User id: 1
Username: Anonymous
Admin: No
IP: 76.190.yy.xx
Host: cpe-76-190-yy-xx.woh.res.rr.com 

Couple things that may be related or not:

in phpmyadmin, when I look at the _session table, the IP is garbled. For example: Lđ/ is whats showing on one. many are blank or just have one letter or symbol.

I had the collation problem. My solution has been to edit specific tables to change it from swedish to utf8)general_ci using the drop down menu. I changed enough to not get error messages but I haven't changed them all. And even the ones I do change still show swedish under Row Statistics. I can't figure out how to edit that, or if I even need to.

I think I read somewhere there is some change that should be made to the themes to make them compatible to 9.1.2.1. I can't find that thread anymore and since i haven't had any outward errors, I'm not attributing anything to this. (But maybe I'm wrong) Whatever the change is, I haven't made it.

Does any of this make any sense?

_________________
My Little Pony Arena

MajorHeadache's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Redhat Enterprise 4/Apache 2.2/MySQL 4.1.22/PHP 5/CPG 9.1.2.1
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Wed Jan 16, 2008 8:37 am
Post subject: Re: MySQL server has gone away

Ip garbled is ok since we save it as variable binary length.

0.0.0.0 could be due a bug on 64bit OS (probably fixed already, I say "probably" because we do not have a 64bit OS where to test it and be sure that its fixed) or other little issues like table/field collation and other bugs related to RDBMS.

So are you saying that changing collation to your table fixed the MySQL server has gone away error?

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
mixed
Back to top
View user's profile Visit poster's website Photo Gallery
MajorHeadache
Supporter
Supporter

Offline Offline
Joined: Mar 05, 2005
Posts: 263
Location: My Little Pony Arena
PostPosted: Wed Jan 16, 2008 5:21 pm
Post subject: Re: MySQL server has gone away

No, I"m not saying collation caused the error. I'm saying I have this MySQL problem and I'm looking for the reason. I also have these other little issues which may, or may not be related.

_________________
My Little Pony Arena

MajorHeadache's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Redhat Enterprise 4/Apache 2.2/MySQL 4.1.22/PHP 5/CPG 9.1.2.1
Back to top
View user's profile Visit poster's website
Mel
Forum Admin
Forum Admin

Offline Offline
Joined: Jul 21, 2004
Posts: 1386
Location: Eastern Time Zone
PostPosted: Wed Jan 16, 2008 6:47 pm
Post subject: Re: MySQL server has gone away

dragonflycms.org/Wiki/id=58.html#4d

_________________
DF TIPS | Upgrade| Find Your Signature Specs|
"A bug in the code is worth two in the documentation. "


Mel please enter your server specs in your user profile! Crying or Very sad
Back to top
View user's profile Visit poster's website
MajorHeadache
Supporter
Supporter

Offline Offline
Joined: Mar 05, 2005
Posts: 263
Location: My Little Pony Arena
PostPosted: Wed Jan 16, 2008 8:07 pm
Post subject: Re: MySQL server has gone away

I can appreciate that rule, however, it is my suspicion that something on my site, whether it's the script, a mondule, or the SQL data, is causing the problem. I was hoping it might ring a bell with someone.

_________________
My Little Pony Arena

MajorHeadache's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Redhat Enterprise 4/Apache 2.2/MySQL 4.1.22/PHP 5/CPG 9.1.2.1
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Wed Jan 16, 2008 9:40 pm
Post subject: Re: MySQL server has gone away

DId you start getting the error immediatly after you updated to 9.1.2.1 OR days later?

Do you know if your ISP have updated MySQL on the same period?
Any other possible clue cna help us to found the issue.

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
mixed
Back to top
View user's profile Visit poster's website Photo Gallery
MajorHeadache
Supporter
Supporter

Offline Offline
Joined: Mar 05, 2005
Posts: 263
Location: My Little Pony Arena
PostPosted: Wed Jan 16, 2008 10:43 pm
Post subject: Re: MySQL server has gone away

What happened was immediately after the upgrade I started getting the collation error, which I fixed in a half-assed way by only changing the tables that were mentioned in the error messages.

The next day Apache was upgraded from 1.3 to 2.? and PHP was upgraded from 4 to 5. It was after that that I first saw this specific error. My first thought was it was the server issues, but my server guy keeps pointing to the site.

I would pay good money to find someone who knows BOTH server configuration AND DragonflyCMS to take a look at my situation and make whatever changes are necessary.

_________________
My Little Pony Arena

MajorHeadache's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Redhat Enterprise 4/Apache 2.2/MySQL 4.1.22/PHP 5/CPG 9.1.2.1
Back to top
View user's profile Visit poster's website
Mel
Forum Admin
Forum Admin

Offline Offline
Joined: Jul 21, 2004
Posts: 1386
Location: Eastern Time Zone
PostPosted: Wed Jan 16, 2008 10:46 pm
Post subject: Re: MySQL server has gone away

major,

Nano is trying to help you find the answers. He will be back on later this afternoon his time, when he gets a chance, he will try to help you.

We spoke about it earlier, so please do not fret, we will come up with something.

_________________
DF TIPS | Upgrade| Find Your Signature Specs|
"A bug in the code is worth two in the documentation. "


Mel please enter your server specs in your user profile! Crying or Very sad
Back to top
View user's profile Visit poster's website
MajorHeadache
Supporter
Supporter

Offline Offline
Joined: Mar 05, 2005
Posts: 263
Location: My Little Pony Arena
PostPosted: Wed Jan 16, 2008 11:34 pm
Post subject: Re: MySQL server has gone away

Thanks!

_________________
My Little Pony Arena

MajorHeadache's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Redhat Enterprise 4/Apache 2.2/MySQL 4.1.22/PHP 5/CPG 9.1.2.1
Back to top
View user's profile Visit poster's website
MajorHeadache
Supporter
Supporter

Offline Offline
Joined: Mar 05, 2005
Posts: 263
Location: My Little Pony Arena
PostPosted: Thu Jan 17, 2008 1:37 am
Post subject: Re: MySQL server has gone away

I don't know if this is a factor or not, but one thing I've also noticed with debug on:

This query is awfully slow:

blocks/block-Who_where.php

* 0.9891 - LINE 21: SELECT s.uname, s.module, s.url, u.user_allow_viewonline FROM moo_session AS s LEFT JOIN moo_users AS u ON u.username=s.uname WHERE guest=0 OR guest=2 ORDER BY s.uname
* 0.0002 - LINE 44: SELECT host_addr, uname, module, url, guest FROM moo_session WHERE guest=1 OR guest=3 ORDER BY guest, host_addr

That's with 43 members online.

_________________
My Little Pony Arena

MajorHeadache's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Redhat Enterprise 4/Apache 2.2/MySQL 4.1.22/PHP 5/CPG 9.1.2.1
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Thu Jan 17, 2008 9:57 am
Post subject: Re: MySQL server has gone away

I'm aware that in some circumstances this could happen, I'm working on it already from few weeks.
For a couple of days I'll dedicate all my free time on this annoying issue and I'll be back to this topic.

On the mean time go to includes/db/sql.php and around line 84 you should have the send_mail function. Comment this line so you will not have your email inbox full of emails
Code::
 //if (!send_mail($mailer_message ..... 

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
mixed
Back to top
View user's profile Visit poster's website Photo Gallery
NanoCaiordo
Developer
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Sat Jan 26, 2008 12:45 am
Post subject: Re: MySQL server has gone away

I've sent you a pm and there is my email included. Could you please forward 10 random sql error emails to my email please?

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
mixed
Back to top
View user's profile Visit poster's website Photo Gallery
MajorHeadache
Supporter
Supporter

Offline Offline
Joined: Mar 05, 2005
Posts: 263
Location: My Little Pony Arena
PostPosted: Sun Mar 30, 2008 12:07 am
Post subject: Re: MySQL server has gone away

I've just come across something regarding the binary IP addresses. I have two sites both running 9.1.2.1. One is a clean install and one is upgraded from 9.0.6.1. What I've just realized is that teh table structure on the older site for ip_address is varchar(8), while the new site has it as varbinary(17). My understanding is if I change the structure on the old site, it will wipe out all the old data.

It is the case that my IP addresses are getting logged incorrectly. Most visitors show as 0.0.0.0 and members IPs seem normal, but checking the facts shows they are in fact wrong.

So, how can I fix this, and if possible, maintain my old data?

PS. upgrading to 9.2 isn't an option until many more modules and themes have been ported, and to be honest, some of them I doubt will ever be ported.

_________________
My Little Pony Arena

MajorHeadache's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Redhat Enterprise 4/Apache 2.2/MySQL 4.1.22/PHP 5/CPG 9.1.2.1
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Mon Mar 31, 2008 4:10 am
Post subject: Re: MySQL server has gone away

MajorHeadache wrote:
upgrading to 9.2 isn't an option until many more modules and themes have been ported, and to be honest, some of them I doubt will ever be ported.

Does your site use all modules and themes availble to download ... just kidding Big grin

Something that NO ONE noticed, but been written many times already, is that by enabling CPG_DEBUG the system will bridge old functions to the new one making your site working as it should but trowning warnings.

This is done to help everyone to visually see where the patches needs to be applied at modules and themes level.

As we did helped many users already, we can help you too.

Again, modules needs upgrade only if it works with ips addresses, otherwise it will be 100% compatible.

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
mixed
Back to top
View user's profile Visit poster's website Photo Gallery
NanoCaiordo
Developer
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Wed Nov 26, 2008 11:05 am
Post subject: Re: MySQL server has gone away

I've been able to fix this annoying issue, and guess what ... DragonflyCMS is not the source.

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
mixed
Back to top
View user's profile Visit poster's website Photo Gallery
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index ⇒  Problems AFTER Install/Upgrade
Page 1 of 2
All times are GMT
Go to page 1, 2  Next



Jump to:  


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
You cannot attach files in this forum
You cannot download files in this forum


 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

Gehiago irakurri . . .

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy