Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: XLimo_Gal on October 08, 2008, 12:51:55 PM

Title: caching.
Post by: XLimo_Gal on October 08, 2008, 12:51:55 PM
ok im totally lost here. I am having an issue with being timesd out tryin to get around my forum I went to my hosting with the error cod im getting which is..
Database Error: MySQL server has gone away
File: /home/ddube/public_html/Poker1/Sources/MessageIndex.php
Line: 610
and they came back with..
Unfortunately it would appear that your mysql queries are taking too long to complete, causing the server to kill them off, as mentioned below:
You may want to look into the caching mechanism at http://www.simplemachines.org/community/index.php?topic&0562.0
Let us know if you need anything after installing the caching function
Now I am searching for this cache system they are talkin about but cant seem to find it. I went and looked in the server settings under cahce and this is what it says
I just looked in the admin area server settings for the cache and it says this..

SMF supports caching through the use of accelerators. The currently supported accelerators include:



* APC

* eAccelerator

* Turck MMCache

* Memcached

* Zend Platform/Performance Suite (Not Zend Optimizer)



Caching will only work on your server if you have PHP compiled with one of the above optimizers, or have memcache available.



SMF performs caching at a variety of levels. The higher the level of caching enabled the more CPU time will be spent retrieving cached information. If caching is available on your machine it is recommended that you try caching at level 1 first.



Note that if you use memcached you need to provide the server details in the setting below. This should be entered as a comma separated list as shown in the example below:

"server1,server2,server3:port,server4"



Note that if no port is specified SMF will use port 11211. SMF will attempt to perform rough/random load balancing across the servers.



SMF has not been able to detect a compatible accelerator on your server.

and the cache level says no cacheing in it. Should I set this to level 1 or do I need a smf caching function mod?

They also asked me if I have persistent MySQL connections enabled in SMF and have no idea where to even find that. I am a newbie at this and just getting totally lost here.
Title: Re: caching.
Post by: Deprecated on October 08, 2008, 01:31:15 PM
Caching and SQL timeouts are not the same thing as far as my understanding.

You don't want to use persistent SQL in a shared hosting environment, again as far as my understanding.

Please post a phpinfo link. What is a phpinfo() file? (http://docs.simplemachines.org/index.php?topic=479)

Also, although I haven't used it, it looks like you should download and execute the SQL Status tool (http://www.simplemachines.org/download/?tools) and tell us your findings.

It is quite possible that your hosting service is overselling and has overloaded their database servers. Who are you with?

It might be helpful if you post a link to your forum. (Not sure, can't hurt.)
Title: Re: caching.
Post by: XLimo_Gal on October 08, 2008, 02:13:30 PM
I am using hostgator and I have tried to get help from them but they say ..

Do you have persistent MySQL connections enabled in SMF? The problem is not that your queries are getting killed but that the MySQL connections are being left open after queries complete.

I checked it and it is diasabled. This started a couple days ago and I have downsized the forum and never had this issue before.and I have one board that i cant get into at all and when i do i get that error and if i delete the board it can fly around the forum. And I have had that board up since day 1 of my forum.

My forums link is  http://freedom2poker.net
Title: Re: caching.
Post by: Deprecated on October 08, 2008, 02:49:10 PM
Well first of all, looking at Hostgator's prices and storage/transfer, they are certainly in the right ballpark for being oversellers. Your problem might be caused by their overloading their servers. (That's why I asked who your host was.)

I think you found it, your persistent check box is at Admin -> Configuration -> Server Settings -> Core Configuration. In most cases the box should NOT be checked, unless there is a problem and that fixes it.

If you have SQL problems they could cause almost any weird effect. For example if you are moving or deleting a board and the SQL fails in the middle of a series of queries it could leave that board in limbo, partially moved. I highly recommend you do not make any configuration changes like moving boards until your connection problem is fixed.

phpinfo?

status tool?
Title: Re: caching.
Post by: XLimo_Gal on October 08, 2008, 03:37:39 PM
I did the php info like you said to do and it was empty when i looked at it now I dont know if I did it right or not you just make a file on a note pad with this on it correct..<?php phpinfo(); ?> and name it phpinfo.php, Thats what I did. Now I am also having issue with updating the forum to could that have something to do with it? Im gettin 2 test failed errors.

Execute Modification     ./Sources/Subs-Post.php     Test failed
Execute Modification     ./SSI.php     Test failed
Title: Re: caching.
Post by: Deprecated on October 08, 2008, 05:14:15 PM
Put that phpinfo.php file in the your forum root, the same directory as your SSI.php.

Since you are having SQL problems it is a very poor idea to be updating or modifying your forum. I believe that it is possible to crash the whole thing if your process hangs up in the middle of several SQL queries. As I said earlier.

status tool?


Please understand what I'm doing here. I have no idea at all what is wrong with your forum. All we can do is to gather information until something sticks out. I have absolutely no idea where this is headed, and I have no idea if I can help you. I'm trying to get you to post as much information as you can, and then I'm hoping that either myself or somebody else will see something wrong in your data. If we get to that point then we can start trying to figure out a solution.

We need that phpinfo.php file put on your server. Use FTP to get it there. I haven't used that status tool but the description sounds like it might be helpful. Let's see.

And how did I find out about the status tool? I was searching your problem here on SMF. I suggest you do the same, try some searches and see if you can find somebody else with your problem. I'm sure you will although not all the problems have the same cause, so keep looking.

Now get that phpinfo and status going and we'll be closer to solving your problem.
Title: Re: caching.
Post by: XLimo_Gal on October 08, 2008, 05:55:40 PM
I really appreciate your help here but I have no idea how to do these things Im still new at this. I use to have someone that did all this for me now they are gone and cant contact them and Im lost. Is this what you mean here
http://74.54.142.210:2082/frontend/x/files/showfile.html?dir=%2fhome%2fddube%2fpublic_html&file=phpinfo.php.txt
I added that in public_html and added the file
Title: Re: caching.
Post by: Deprecated on October 08, 2008, 06:03:13 PM
No. When you saved it in Notepad that damned Windoze program renamed it to phpinfo.php.txt so you need to use your FTP or cPanel file manager and rename it to phpinfo.php

You're welcome. I hope we get joined by some of the other SMF volunteer helpers. I hope nobody got the mistaken impression that I know anything about what the problem might be.

My main mission right now is to get you to put up as much information as possible so that when somebody who knows what they are doing comes along all they'll have to do is look at the info and tell you what to fix. Or by a long shot maybe I'll be able to see it. I won't know until I've seen all the data. :)
Title: Re: caching.
Post by: XLimo_Gal on October 08, 2008, 06:42:35 PM
Oh I really appreciate you tryin to help me omg you dont know how much Thank you very much..ok i renamed it like you said to  and I wasnt sure where to put it
ok to make sure im putting this in the right place i go to file manager then to public_html then add it there then I found the SSI.php and added it there.
heres the url
http://www.freedom2poker.net/Poker1/phpinfo.php

Title: Re: caching.
Post by: Deprecated on October 08, 2008, 07:14:38 PM
One thing I discovered is that your host doesn't even allow persistent MySQL connections. Your host has mysql.allow_persistent set to "off." Your timeout is set to 60 seconds which is adequate. It's the same setting as my own (which BTW has mysql.allow_persistent = on). My forum though has persistent = off.

How long are these queries taking? Over 60 seconds before you get your page?


I was just struck with a thought. A few times that I visited your forum it appeared that some images were taking a horribly long time to load. I wonder if your images could be slowing things down including the SQL...

Another few ideas.

Go to Admin -> Configuration -> Features and Options -> Layout and turn on "Display time taken to create every page."

Also, edit your Settings.php and insert the following line:

$db_show_debug = true;

Put it just above the last line with the ?> on it. DO NOT USE NOTEPAD!!! Notepad will screw this file up really bad. Use Notepad++ available at Sourceforge (http://sourceforge.net/projects/notepad-plus). (Sourceforge another great open source project with hundreds of great, free programs).

By the way, save a copy of your Settings.php in a safe place. Edit a copy.

You will probably want to take out that "Display time taken..." and you will definitely want to take out that $db_show_debug = true after your problem is fixed because it puts some garbage at the bottom of your pages (important garbage).
Title: Re: caching.
Post by: XLimo_Gal on October 08, 2008, 07:37:14 PM
ok i did the configuration thing now which one of these do I want theres 2 to choose from to downlaod
notepad++ releases binary     npp 5.0.3 bin     
notepad++ releases source    npp 5.0.3 src
Title: Re: caching.
Post by: XLimo_Gal on October 08, 2008, 07:53:28 PM
one of my admin just told me lastnight they were tryin to figure out the problem and they said that.. dont have problem with sql, it was the new theme that corrupted one of ur database files , it was blank there and sql trying to find it". I dont know if that helps at all. I installed that halloween theme but have taken it out now all this trouble started after i installed that.
Title: Re: caching.
Post by: Deprecated on October 08, 2008, 10:38:10 PM
I am assuming you have a Windows computer.

http://downloads.sourceforge.net/notepad-plus/npp.5.0.3.Installer.exe?modtime=1217782718&big_mirror=0
Title: Re: caching.
Post by: Deprecated on October 08, 2008, 10:40:08 PM
Quote from: XLimo_Gal on October 08, 2008, 07:53:28 PM
one of my admin just told me lastnight they were tryin to figure out the problem and they said that.. dont have problem with sql, it was the new theme that corrupted one of ur database files , it was blank there and sql trying to find it". I dont know if that helps at all. I installed that halloween theme but have taken it out now all this trouble started after i installed that.

Perhaps so. If they're that good have them fix it. :)
Title: Re: caching.
Post by: XLimo_Gal on October 09, 2008, 03:02:52 AM
No No they are just tellin me what they found. believe me i appreciate what you been trying to do for me.
Title: Re: caching.
Post by: Deprecated on October 09, 2008, 09:09:01 AM
You're welcome XLG. :)

I hope some of the other volunteer support people will add their ideas to solving your problem today.

Please try to get that SQL Status Tool going, and also please try to get that Settings.php edited to put in the extra line as described above. I don't know what they will tell us, don't even know if they will help us, but there's only one way to find out.

One good thing though, the only problem that truly cannot be fixed is when somebody blows their whole database and has no backup. Virtually every other problem can always be fixed one way or another. Tens of thousands of happy SMF forum sites are the proof of that.