SimplePortal

Development => Bugs => Fixed or Bogus Bugs => Topic started by: teos on June 10, 2011, 02:21:27 PM

Title: Shoutbox
Post by: teos on June 10, 2011, 02:21:27 PM
SMF 1.1.13  default theme  SP2.3.3

 extract from SMF ...
------------------------------------------------
All of a sudden, main page failed loading in the middle of the process , getting message ;

"mysql server has gone away

load.php  line 2040"


 The failing block to load is "recent posts and topics"

I removed the block, and main page recovered.

I recreated the same block with the same parms.

Failed again.


 Tested with smf "unread posts" or " unread replies"  they work properly, so nothing wrong with smf, I think.

Hosting firm states that, there is nothing wrong with the server, increased :

wait_timeout=xx
connect_timeout=xx

 values for me to test, but not resolved.


  What can be broken all of a sudden ?, working with SP2.3.3 for a long time with no error up to now...

nb. for test, I put the newly created "recent posts" block to the end of the page, now fails exactly at the phase of loading
this block.

FOUND the culprit :  removed shoutbox entries ...

  Now every block works properly. 

So the question is :  How any entry in shoutbox,  can cause the main portal page load failure ?

AngelinaBelle :
This is very, very strange.  Can you take this problem to simpleportal.net? If a certain shoutbox entry can cause such a problem in one of the functions in load.php, there might be a bug somewhere, or at least a performance issue.
I don't know if the problem is with simpleportal, or if simpleportal has found some other kind of problem with SMF or with your database.

This one could be very tricky to sort out. Did you save copies of the shoutbox entries that caused you the problems?
It is very difficult to figure out a problem if you cannot make it happen again...

Thanks AngelinaBelle,

  In fact, I've noticed that the problem is solid. ( at least for my system)

Deleted the old ones ( shoutbox)

Created fresh ones ( both shoubox and block related)

  If no entry in the block,  fine ..  ( main pages loads properly)

As soon as I enter something ( Like "test", no special character) in the shoutbox, and try to load the main page, facing the same failure. mysql has gone away ...


Seems some settings for shoutbox in the DB somehow corrupted.

I hope it's clear..   

DB entries attached

---------------------- Code around line 2040 from load.php ---------------------------

   // First try to update an existing row...
   $result = db_query("
      UPDATE {$db_prefix}sessions
      SET data = '" . addslashes($data) . "', last_update = " . time() . "
      WHERE session_id = '" . addslashes($session_id) . "'
      LIMIT 1", __FILE__, __LINE__);                          <--------- LINE 2040

   // If that didn't work, try inserting a new one.
   if (db_affected_rows() == 0)
      $result = db_query("
         INSERT IGNORE INTO {$db_prefix}sessions
            (session_id, data, last_update)
         VALUES ('" . addslashes($session_id) . "', '" . addslashes($data) . "', " . time() . ")", __FILE__, __LINE__);

   return $result;
Title: Re: Shoutbox
Post by: teos on June 10, 2011, 02:49:14 PM
Strange then ever :-) .

 Didnt delete shoutbox  but deleted only  block for it.  Recreated a new block (exactly same parms) .
Tested with any character and no problem up to now. 

I can hardly explain what happened between the steps ...

Finally seems solved.  Sorry for bothering ...
SimplePortal 2.3.8 © 2008-2024, SimplePortal