TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,027
  • Total Topics: 21,334
  • Online today: 519
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 381
  • Total: 381

Strange error just appeared.

Started by PHXMaximus, December 28, 2009, 03:07:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PHXMaximus

Hello Friends! Happy New Year!

I have a problem that just showed up, and was hoping you might be able to provide some guidance.

Yesterday, I was able to get into my blocks and panels just fine to edit them. Today, when I try to get into blocks, I get this;


Latest blockcodes from tinyportal.co.uk

[Show] [Hide] Latest blockcodes

Database Error: MySQL server has gone away
File: /home/clanphx/public_html/Sources/Subs.php
Line: 2578




So, I went to subs.php line 2578 and this is the code;



2573         // Load the smileys in reverse order by length so they don't get parsed wrong.
         if (($temp = cache_get_data('parsing_smileys', 480)) == null)
         {
            $result = db_query("
               SELECT code, filename, description
2578               FROM {$db_prefix}smileys", __FILE__, __LINE__);
            $smileysfrom = array();
            $smileysto = array();
            $smileysdescs = array();
            while ($row = mysql_fetch_assoc($result))
            {
               $smileysfrom[] = $row['code'];
               $smileysto[] = $row['filename'];
               $smileysdescs[] = $row['description'];
            }
            mysql_free_result($result);

            cache_put_data('parsing_smileys', array($smileysfrom, $smileysto, $smileysdescs), 480);
         }
         else
            list ($smileysfrom, $smileysto, $smileysdescs) = $temp;
2594      }


So, I am not sure what to do with this information, or why this started happening since yesterday. I have made no changes to anything in the last 24 hours, except for one of the block, in which I simply changed the picture it displayed.

I am using SMF 1.1.11 and TP 1.0 beta 4. Here is a list of my mods;

1.     YouTube BBCode      2.5.1      
2.    SMF Gallery Lite    2.0.7
3.    TinyPortal    1.083    
4.    SMF Gallery Pro    2.5.3
5.    SMF 1.0.19 / 1.1.11 Update    1.0
6.    Enhanced Quick Reply Box 2.0.2    2.0.2
7.    Treasury    2.36    
8.    Unread and Replies Tabs in Main Menu    2.0    
9.    Yarex 2 smiley set    2.0.0.1    
10.    XFire Profile Modification    2.0

Thanks for your time and help!

Justin

PS This error DOES NOT show up in the forum error log.

PHXMaximus

I just checked the rest of the TP stuff, and this same error comes up under MODULES. So it appears to affect the BLOCKS and MODULES tabs.

PHXMaximus

#2
When I clicked on the TP package server, I also got the same error. But with the package manager and modules, its intermittent. With Blocks, it happens each time.

PHXMaximus

Uggg never mind, I came to realize this is more than likely a host issue, so I put in a ticket with them. I left this thread just in case someone knows what might be causing the query to time out.

PHXMaximus

#4
Well here is the answer from my host... in a nut shell, they are blaming SMF;

Hello Justin,

Thank you for the update. In that case, I\'m afraid that it is the query itself that is taking too long to execute. I have checked our mysql log file and I can see that there are numerous slow mysql queries. For example, the following query took more than 30 seconds to complete, while a regular one should take no more than just a second or two:

--------
....VALUES (43, 1260357384, SUBSTRING(\'68.194.208.6\', 1, 16), SUBSTRING(\'?action=profile\', 1, 65534), SUBSTRING(\'8: Undefined index: tp-from
File: /home/clanphx/public_html/Sources/TPSubs.php
Line: 1394\', 1, 65534), \'9834ce13e17e097ffe49da69f3dd2ed4\'....

--------------------------

The actual query has been trimmed, since the whole text will probably flood the ticket. By looking at it however you will notice that it is actually trying to log a php error:

Undefined index: tp-from
File: /home/clanphx/public_html/Sources/TPSubs.php

which leads me to believe the issue is a coding related one and is not connected to the mySQL service itself.

I\'m afraid however, as mentioned above in my reply, we do currently do not provide optimization services and as such we cannot help you further on that point. I can only recommend you to get in touch with a professional web developer who can investigate and examine the code and eliminate the problem.

If you have any other questions or comments, please don\'t hesitate to contact us!

Best Regards,
Val M.
Shift Supervisor





I asked this here since the error occurs when trying to access parts of TP. And, the error he gave an example isn't related to the error I have now, I don't believe. I had other errors before which were resolved by coding.

bloc

What kind of server are you on? Shared hosting?

While the query is fairly complex, this type is used all the time on logging errors in SMF, not just missing text strings from TP - but on every type of error. The size of the actual string is due to SMF is including every info when the error occured.

This  means you either have to turn off error logging in SMF for now, to see if things get better - or get another host, as the hosting plan you are on might not be able to handle it.Thats an estimate of course, as I don't know what kind of traffic you have.

PHXMaximus

Bloc yes I am on shared hosting. I have been reading steadily since I first posted this and have come to find out that the fact that I am on an oversold server is probably the source of my issue. In fact, I am looking at a new host as I type this, one that has only 60 sites per server and is dedicated to SMF hosting.

PHXMaximus

This was solved by going to a non-oversold host. In fact Bloc, it is the host you do custom themes for. :)

This website is proudly hosted on Crocweb Cloud Website Hosting.