Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: meylodie on May 28, 2013, 04:19:24 AM

Title: Forum throwing errors
Post by: meylodie on May 28, 2013, 04:19:24 AM
Hi,
Our forum moved from a host to another host. It has now been on line for a pair of days, a glitch with encoding was fixed, all went well so far. We had some sluggishness, but the host has fixed it on the server side.

This morning while hitting the button "answer", in order to answer to a post I get this error message:
QuoteData bases error:
MySQL server has gone away
Fichier: /home/orditux/public_html/linuxvillage.net/Sources/Post.php
Lign: 149
Note : It is possible that your database needs an update. Actually, the version of the files of the forum is SMF 2.0.4,
whereas your databases in in version SMF 2.0.3. The above error could be corrected by executing the last upgrade.php version.

Here is the file Post.php:
http://pastebin.fr/27543

lign 149 and above:
    // Check if it's locked.  It isn't locked if no topic is specified.
    if (!empty($topic))
    {
        $request = $smcFunc['db_query']('', '
            SELECT
                t.locked, IFNULL(ln.id_topic, 0) AS notify, t.is_sticky, t.id_poll, t.id_last_msg, mf.id_member,
                t.id_first_msg, mf.subject,
                CASE WHEN ml.poster_time > ml.modified_time THEN ml.poster_time ELSE ml.modified_time END AS last_post_time
            FROM {db_prefix}topics AS t
                LEFT JOIN {db_prefix}log_notify AS ln ON (ln.id_topic = t.id_topic AND ln.id_member = {int:current_member})
                LEFT JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
                LEFT JOIN {db_prefix}messages AS ml ON (ml.id_msg = t.id_last_msg)
            WHERE t.id_topic = {int:current_topic}
            LIMIT 1',
            array(
                'current_member' => $user_info['id'],
                'current_topic' => $topic,
            )
        );


How can I fix it?

Thanks,
Mélodie

Title: Re: Forum throwing errors
Post by: Storman™ on May 28, 2013, 06:34:10 AM
Could you attach your Post.php file here, the one linked in your post above is incomplete, about a third of it is missing.

Not sure if thats the problem (might be a cut and paste error) but it would be good to check.
Title: Re: Forum throwing errors
Post by: meylodie on May 28, 2013, 06:56:24 AM
Hi,

Here is the file attached.

Thank you

Title: Re: Forum throwing errors
Post by: kat on May 28, 2013, 07:15:36 AM
You can safely ignore the "Database upgrade" message, Mel...

It's what Microsoft call "A feature". ;)

Title: Re: Forum throwing errors
Post by: meylodie on May 28, 2013, 07:23:47 AM
Quote from: K@ on May 28, 2013, 07:15:36 AM
You can safely ignore the "Database upgrade" message, Mel...

It's what Microsoft call "A feature". ;)

Therefore it's a bug. ;)

What can cause this message whose effects look like a timeout? The members say it's slow : from the US, and the forum is hosted in France. I am in France and at times I find it also a bit slow. I have seen half a dozen guests trying to register or to connect last time: all from China (I think we have the good plugins to prevent spambots registering). Could the problem come from there? Any other idea related to databases?



Title: Re: Forum throwing errors
Post by: kat on May 28, 2013, 07:46:17 AM
Not a bug, really. Just a little something that someone forgot to change, really. People are people, after all. ;)

"Slow" is always difficult to figure-out. Often, it's down to the host being oversellers and that kinda thing. If a host offers "Unlimited" anything, it's a bit of a giveaway. "Unlimted" doesn't exist!

Who is your host, now?

Just a quickie, though. Have a look in Admin>Server settings>Caching.

Is that being used? Level one's usually OK, there. If you get any warnings, there, don't use it.
Title: Re: Forum throwing errors
Post by: meylodie on May 28, 2013, 12:52:40 PM
Yes, it is exactly the setting which is on, and there is no warning. So I suppose it's good. Yes, the host has some not limited things, such as bandwidth uses and space, but before moving the forum there I have asked if my contract allowed me to add the forum to my own account, and I was told it's not a problem on their side but might slow down my own website. So I have been warned. On the other hand for the time being it is the best solution I have, considering I know the host, and the quality of service and support+availability which is very good.

Thanks for all your answers,
Mélodie

Title: Re: Forum throwing errors
Post by: kat on May 28, 2013, 02:44:11 PM
As you've just moved, the cache'll need to refill, if you know what I mean.

Maybe, after a while, things'll speed up. If not, there's precious little more that you can do, really, that won't involve throwing cash at your host.
Title: Re: Forum throwing errors
Post by: meylodie on May 28, 2013, 03:02:37 PM
Quote from: K@ on May 28, 2013, 02:44:11 PMAs you've just moved, the cache'll need to refill, if you know what I mean.

Ok.

QuoteIf not, there's precious little more that you can do

Translation please? :)

Quotethat won't involve throwing cash at your host.

The cash was already spent for my own website. The forum is not that slow now, but it is attacked by a hurd of spammers who try to register. I realized I had to remove and reinstall the MOD's. I reinstalled KeyCaptcha and StopForumSpam, because when I moved I chose to first install a brand new forum, so the php files used by these MOD's had not been modified : at least this is what it seems to me, because before I do this they were not activated and I didn't find any mean to activate them, and after reinstalling they were activated.

I have to remember or try now how to setup the registering options so that KeyCaptcha works because I have not succeeded in having it display while registering with a test user yet.

I am using Midori for the configuration and tests, it's way faster than Firefox!
Title: Re: Forum throwing errors
Post by: kat on May 28, 2013, 03:17:16 PM
"If not, there's precious little more that you can do" = "If that doesn't change anything, there's not a lot more that can be done". Something like "Sinon, il n'y a rien de plus précieux que vous pouvez faire"?

I tried Midori, a little while ago. I found Opera to be even faster. :)
Title: Re: Forum throwing errors
Post by: meylodie on May 28, 2013, 03:33:46 PM
Quote from: K@ on May 28, 2013, 03:17:16 PM"If not, there's precious little more that you can do" = "If that doesn't change anything, there's not a lot more that can be done". Something like "Sinon, il n'y a rien de plus précieux que vous pouvez faire"?

I was not sure at all. In French we would not refer to the Lord of Rings in such case. :)

"Sinon, il n'y a rien de mieux que vous puissiez faire" - or "rien de plus"/nothing more...
QuoteI tried Midori, a little while ago. I found Opera to be even faster. :)

Did you benchmark it with "time" ?

Anyhow for the time being Midori does the job alright, and I master it's configuration, whereas I'm a bit lost in the options in Opera.

Thank you for your support and discussion.


Title: Re: Forum throwing errors
Post by: kat on May 28, 2013, 03:46:59 PM
That's just a normal English phrase. We used it long before LOTR was even written. :)

I can understand why someone who's not English would read it and think it was odd, though.

I've spent a lot of time, in France. Loved every minute of it, too. :)

Dijon, Lyon, Paris, of course, Beune, Presqu'île de Giens, Rhiems... all over the place, really.

Unfortunately, my French is a bit rusty, now. :(
Title: Re: Forum throwing errors
Post by: meylodie on May 28, 2013, 04:04:03 PM
Quote from: K@ on May 28, 2013, 03:46:59 PMUnfortunately, my French is a bit rusty, now. :(

The forums and IRC channels have helped me improve my English a lot. Our forum (http://linuxvillage.net) is in both languages, as well as our channel. If it is of any interest to you...


Title: Re: Forum throwing errors
Post by: kat on May 28, 2013, 04:15:25 PM
Having had a look around, that looks like a very well run site, to me!

If I get time, I might well come and join you, if my health allows. :)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.katzy.dsl.pipex.com%2FSmileys%2Fthankyou.gif&hash=4489cb14ab2635e06c9c70675e549826bf7e07aa)
Title: Re: Forum throwing errors
Post by: meylodie on May 28, 2013, 04:34:13 PM
Quote from: K@ on May 28, 2013, 04:15:25 PMHaving had a look around, that looks like a very well run site, to me!

Thank you! And we are fighting spam (http://linuxvillage.net/index.php/topic,363.msg2383.html#msg2383) too.   :P

QuoteIf I get time, I might well come and join you, if my health allows. :)

You could also visit us on the chan although less members stay at it currently. It's logged here (http://irclog.perlgeek.de/linuxvillage).

Quote(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.katzy.dsl.pipex.com%2FSmileys%2Fthankyou.gif&hash=4489cb14ab2635e06c9c70675e549826bf7e07aa)

Nice smiley! :D

Title: Re: Forum throwing errors
Post by: kat on May 28, 2013, 05:04:58 PM
I have a site full of them.

If you want to take any, or use them, feel free!

http://www.katzy.dsl.pipex.com

Quote from: meylodie on May 28, 2013, 04:34:13 PMAnd we are fighting spam (http://linuxvillage.net/index.php/topic,363.msg2383.html#msg2383) too.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.katzy.dsl.pipex.com%2FSmileys%2Fgiggle.gif&hash=5e80a98c3d04c08d8574cd705bb1f58802253210)
Title: Re: Forum throwing errors
Post by: YogiBear on May 29, 2013, 05:52:32 PM
Hé, meylodie, vous dirigez un forum très intéressant-là. J'ai envie de m'y inscrire aussi. Hihi, quant au Linux, K@ et moi, nous pouvons vous posez des questions en français...  ;D
Title: Re: Forum throwing errors
Post by: kat on May 30, 2013, 04:54:10 AM
Poseur...  ;)
Title: Re: Forum throwing errors
Post by: meylodie on June 05, 2013, 07:54:25 AM
Quote from: YogiBear on May 29, 2013, 05:52:32 PM
Hé, meylodie, vous dirigez un forum très intéressant-là. J'ai envie de m'y inscrire aussi. Hihi, quant au Linux, K@ et moi, nous pouvons vous posez des questions en français...  ;D

Posez, posez ! Nous attendons les questions ! :)

Aren't you also at the unity-linux community?

Title: Re: Forum throwing errors
Post by: MrPhil on June 05, 2013, 09:26:01 AM
Quote from: meylodie on May 28, 2013, 04:04:03 PM
The forums and IRC channels have helped me improve my English a lot.

Actually, it can be quite hazardous to learn (or improve) your English online. You need to be careful not to pick up habits of bad spelling and grammar. Even if some construct is quite common online, that doesn't make it correct (i.e., you need formal instruction, and reference materials at hand). Americans, due to our poor educational system, tend to be the worst of all, often even worse than ESL people (who at least, have an excuse for making mistakes). So, be careful when learning (or polishing) your English from what is written online!