1
Chris03
Smartfaq problems
  • 2005/3/26 19:13

  • Chris03

  • Quite a regular

  • Posts: 372

  • Since: 2004/2/22


Installed smartfaq and everything was cool through the admin but when i try to view the faq from the website it crashes MySQL on my server and i have to restart it, all other modules work, cept this one......

2
jdseymour
Re: Smartfaq problems

Is this a local (on your computer server) or a hosted server?

Does MySql server require a reboot after crash?

Any other errors? If it crashes Mysql, then your site totally stops working because all data for XOOPS is in the database.

Turn on MySQL debug and see if it shows any thing when you use smartfaq.

3
Chris03
Re: Smartfaq problems
  • 2005/3/26 19:28

  • Chris03

  • Quite a regular

  • Posts: 372

  • Since: 2004/2/22


SELECT * FROM dext_config WHERE (conf_modid = 0 AND conf_catid = 1) ORDER BY conf_order ASC
SELECT sess_data FROM dext_session WHERE sess_id = '56cf5d75303092f772f5cb6968041616'
SELECT * FROM dext_users WHERE uid=1
SELECT * FROM dext_modules WHERE dirname = 'faq'
SELECT * FROM dext_config WHERE (conf_modid = 12) ORDER BY conf_order ASC
DELETE FROM dext_protector_access WHERE expire < UNIX_TIMESTAMP()
SELECT COUNT(*) FROM dext_protector_access WHERE ip='67.162.232.195' AND request_uri='/modules/faq/index.php'
SELECT COUNT(*) FROM dext_protector_access WHERE ip='67.162.232.195'
INSERT INTO dext_protector_access SET ip='67.162.232.195',request_uri='/modules/faq/index.php',expire=UNIX_TIMESTAMP()+'60'
SELECT COUNT(*) FROM dext_faq_categories WHERE (parentid = 0)
SELECT COUNT(*) FROM dext_faq_faq WHERE ((status = 5 OR status = 6))
SELECT * FROM dext_config WHERE (conf_modid = 0 AND conf_catid = 3) ORDER BY conf_order ASC
SELECT DISTINCT gperm_itemid FROM dext_group_permission WHERE gperm_name = 'block_read' AND gperm_modid = 1 AND gperm_groupid IN (1,2)
SELECT b.* FROM dext_newblocks b, dext_block_module_link m WHERE m.block_id=b.bid AND b.isactive=1 AND b.visible=1 AND m.module_id IN (0,12) AND b.bid IN (1,2,3,25,4,6,5,50,7,49,8,48,9,47,10,17,11,42,12,46,19,18,45,44,20,21,22,23,24,41,40,39,38,37,36,35,34,33,32,31,26,27,30,29,28) ORDER BY b.weight,b.bid
SELECT COUNT(*) FROM dext_priv_msgs WHERE (read_msg = 0 AND to_userid = 1)
SELECT * FROM dext_modules WHERE (hasmain = 1 AND isactive = 1 AND weight > 0) ORDER BY weight ASC, mid ASC
SELECT * FROM dext_group_permission WHERE (gperm_name = 'module_read' AND gperm_modid = 1 AND (gperm_groupid = 1 OR gperm_groupid = 2))
SELECT * FROM dext_modules WHERE dirname = 'news'
SELECT * FROM dext_modules WHERE dirname = 'hosting'
SELECT * FROM dext_config WHERE (conf_modid = 8) ORDER BY conf_order ASC
SELECT CID, pagetitle, defaultpage FROM dext_wfschannel WHERE defaultpage = '0' AND submenu = 1 AND (publishdate > 0 AND publishdate <= 1111862404) AND (expiredate = 0 OR expiredate > 1111862404) ORDER BY weight
SELECT submenuitem, titlelink FROM dext_wfslinktous
SELECT submenuitem , titlerefer FROM dext_wfsrefer
SELECT * FROM dext_modules WHERE dirname = 'spaw'
SELECT * FROM dext_modules WHERE dirname = 'downloads'
SELECT * FROM dext_modules WHERE dirname = 'links'
SELECT * FROM dext_groups
SELECT COUNT(*) FROM dext_faq_faq WHERE ((status = 2))
SELECT * FROM dext_groups
SELECT * FROM dext_smiles
SELECT * FROM dext_faq_categories WHERE (parentid = 0) ORDER BY weight ASC LIMIT 0, 5
SELECT * FROM dext_faq_categories
SELECT categoryid, COUNT(*) AS count FROM dext_faq_faq WHERE status IN (5,6) GROUP BY categoryid
CREATE TEMPORARY TABLE tmp (categoryid INT(8) UNSIGNED NOT NULL,datesub int(11) DEFAULT '0' NOT NULL);
LOCK TABLES dext_faq_faq READ;
INSERT INTO tmp SELECT categoryid, MAX(datesub) FROM dext_faq_faq WHERE status IN (5,6) GROUP BY categoryid;
SELECT dext_faq_faq.categoryid, faqid, question, uid, dext_faq_faq.datesub FROM dext_faq_faq, tmp WHERE dext_faq_faq.categoryid=tmp.categoryid AND dext_faq_faq.datesub=tmp.datesub;
Error number: 2013
Error message: Lost connection to MySQL server during query
UNLOCK TABLES;
Error number: 2006
Error message: MySQL server has gone away
DROP TABLE tmp;
Error number: 2006
Error message: MySQL server has gone away
SELECT * FROM dext_faq_faq WHERE ((status = 5 OR status = 6)) ORDER BY datesub DESC LIMIT 0, 5
SELECT * FROM dext_faq_categories
SELECT faqid, answer, uid, datesub FROM dext_faq_answers WHERE faqid IN (1) AND status = 1 GROUP BY faqid
SELECT * FROM dext_users WHERE uid IN (1)
Total: 43 queries

Blocks
User Menu: No Cache
Main Menu: No Cache
Custom Block (HTML): No Cache
Symantec Alert Box: No Cache
Protector: No Cache
Total: 5 blocks

Execution Time
XOOPS took 8.14121794701 seconds to load.



this a server running MySQL 4.1.10a, this is a server here with me, but im a hosting supplier, yes i have to restart MySQL EVERYTIME i click that faq link, i can restart MySQL while the page is still trying to load and it will load finally, but if i click the faq link it dies within seconds


all other modules load in like 0.126 seconds or so.....

4
jdseymour
Re: Smartfaq problems

Maybe someone else has an Idea. I just checked MySQL debug on my site running smartfaq and my querries does not look anything like yours. Your tables seem to be prefix_faq_ mine are prefix_smartfaq_.

Sorry I couldn't help more.

5
Chris03
Re: Smartfaq problems
  • 2005/3/26 19:52

  • Chris03

  • Quite a regular

  • Posts: 372

  • Since: 2004/2/22


ok here is a FRESH smartfaq version 1.04

SELECT * FROM dext_config WHERE (conf_modid = 0 AND conf_catid = 1) ORDER BY conf_order ASC
SELECT sess_data FROM dext_session WHERE sess_id = '56cf5d75303092f772f5cb6968041616'
SELECT * FROM dext_users WHERE uid=1
SELECT * FROM dext_modules WHERE dirname = 'smartfaq'
SELECT * FROM dext_config WHERE (conf_modid = 17) ORDER BY conf_order ASC
DELETE FROM dext_protector_access WHERE expire < UNIX_TIMESTAMP()
SELECT COUNT(*) FROM dext_protector_access WHERE ip='67.162.232.195' AND request_uri='/modules/smartfaq/index.php'
SELECT COUNT(*) FROM dext_protector_access WHERE ip='67.162.232.195'
INSERT INTO dext_protector_access SET ip='67.162.232.195',request_uri='/modules/smartfaq/index.php',expire=UNIX_TIMESTAMP()+'60'
SELECT COUNT(*) FROM dext_smartfaq_categories WHERE (parentid = 0)
SELECT COUNT(*) FROM dext_smartfaq_faq WHERE ((status = 5 OR status = 6))
SELECT * FROM dext_config WHERE (conf_modid = 0 AND conf_catid = 3) ORDER BY conf_order ASC
SELECT DISTINCT gperm_itemid FROM dext_group_permission WHERE gperm_name = 'block_read' AND gperm_modid = 1 AND gperm_groupid IN (1,2)
SELECT b.* FROM dext_newblocks b, dext_block_module_link m WHERE m.block_id=b.bid AND b.isactive=1 AND b.visible=1 AND m.module_id IN (0,17) AND b.bid IN (1,2,3,25,4,6,5,50,7,49,8,48,9,47,10,17,11,42,12,46,19,18,45,44,20,21,22,23,24,41,40,39,38,37,36,35,34,33,32,31,26,27,30,29,28,51,52,53,54,55,56,57,58) ORDER BY b.weight,b.bid
SELECT COUNT(*) FROM dext_priv_msgs WHERE (read_msg = 0 AND to_userid = 1)
SELECT * FROM dext_modules WHERE (hasmain = 1 AND isactive = 1 AND weight > 0) ORDER BY weight ASC, mid ASC
SELECT * FROM dext_group_permission WHERE (gperm_name = 'module_read' AND gperm_modid = 1 AND (gperm_groupid = 1 OR gperm_groupid = 2))
SELECT * FROM dext_modules WHERE dirname = 'news'
SELECT COUNT(*) FROM dext_smartfaq_faq WHERE ((status = 2))
SELECT * FROM dext_groups
SELECT * FROM dext_modules WHERE dirname = 'hosting'
SELECT * FROM dext_config WHERE (conf_modid = 8) ORDER BY conf_order ASC
SELECT CID, pagetitle, defaultpage FROM dext_wfschannel WHERE defaultpage = '0' AND submenu = 1 AND (publishdate > 0 AND publishdate <= 1111863891) AND (expiredate = 0 OR expiredate > 1111863891) ORDER BY weight
SELECT submenuitem, titlelink FROM dext_wfslinktous
SELECT submenuitem , titlerefer FROM dext_wfsrefer
SELECT * FROM dext_modules WHERE dirname = 'spaw'
SELECT * FROM dext_modules WHERE dirname = 'downloads'
SELECT * FROM dext_modules WHERE dirname = 'links'
SELECT * FROM dext_groups
SELECT * FROM dext_groups
SELECT * FROM dext_smiles
SELECT * FROM dext_smartfaq_categories WHERE (parentid = 0) ORDER BY weight ASC LIMIT 0, 5
SELECT * FROM dext_smartfaq_categories
SELECT categoryid, COUNT(*) AS count FROM dext_smartfaq_faq WHERE status IN (5,6) GROUP BY categoryid
CREATE TEMPORARY TABLE tmp (categoryid INT(8) UNSIGNED NOT NULL,datesub int(11) DEFAULT '0' NOT NULL);
LOCK TABLES dext_smartfaq_faq READ;
INSERT INTO tmp SELECT categoryid, MAX(datesub) FROM dext_smartfaq_faq WHERE status IN (5,6) GROUP BY categoryid;
SELECT dext_smartfaq_faq.categoryid, faqid, question, uid, dext_smartfaq_faq.datesub FROM dext_smartfaq_faq, tmp WHERE dext_smartfaq_faq.categoryid=tmp.categoryid AND dext_smartfaq_faq.datesub=tmp.datesub;
Error number: 2013
Error message: Lost connection to MySQL server during query
UNLOCK TABLES;
Error number: 2006
Error message: MySQL server has gone away
DROP TABLE tmp;
Error number: 2006
Error message: MySQL server has gone away
SELECT * FROM dext_smartfaq_faq WHERE ((status = 5 OR status = 6)) ORDER BY datesub DESC LIMIT 0, 5
SELECT * FROM dext_smartfaq_categories
SELECT faqid, answer, uid, datesub FROM dext_smartfaq_answers WHERE faqid IN (1) AND status = 1 GROUP BY faqid
SELECT * FROM dext_users WHERE uid IN (1)
SELECT COUNT(*) FROM dext_smartfaq_faq WHERE ((status = 2))
SELECT * FROM dext_groups
SELECT * FROM dext_xoopsnotifications WHERE (not_modid = 17 AND not_category = 'global_faq' AND not_uid = 1) ORDER BY not_id ASC
SELECT * FROM dext_modules WHERE mid = 17
SELECT COUNT(*) FROM dext_smartfaq_faq WHERE ((status = 2))
SELECT * FROM dext_groups
Total: 50 queries

Blocks
User Menu: No Cache
Main Menu: No Cache
Custom Block (HTML): No Cache
Symantec Alert Box: No Cache
Protector: No Cache
Total: 5 blocks

Execution Time
XOOPS took 9.47105813026 seconds to load.

ok so i ran the first BAD query through phpmyadmin and it says

SQL-query:

SELECT dext_smartfaq_faq.categoryid, faqid, question, uid, dext_smartfaq_faq.datesub
FROM dext_smartfaq_faq, tmp
WHERE dext_smartfaq_faq.categoryid = tmp.categoryid
AND dext_smartfaq_faq.datesub = tmp.datesub
LIMIT 0 , 30
MySQL said:

#1146 - Table 'dataextreme_site.tmp' doesn't exist


same thing

6
rowdie
Re: Smartfaq problems
  • 2005/3/26 20:30

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


Could it be that your database user doesn't have CREATE privileges?

I suspect that it fails on an earlier query, the CREATE TEMPORARY TABLE one. Looking at the code, I don't think it outputs an error message if that command fails.

edit: it looks like CREATE TEMPORARY TABLE privileges are needed, not just CREATE.

7
Chris03
Re: Smartfaq problems
  • 2005/3/26 20:39

  • Chris03

  • Quite a regular

  • Posts: 372

  • Since: 2004/2/22


i have all but grant. this also happens even if i use the root user

8
Mithrandir
Re: Smartfaq problems

Error messageLost connection to MySQL server during query


The MySQL documentation says this:
Quote:

The most common reason for the MySQL server has gone away error is that the server timed out and closed the connection. In this case, you normally get one of the following error codes (which one you get is operating system-dependent)

Link to documentation

It also has this to say:

Quote:
you can also get these errors if you send a query to the server that is incorrect or too large. If mysqld receives a packet that is too large or out of order, it assumes that something has gone wrong with the client and closes the connection


It could be that the temporary table solution is not quite the best to use here (but deemed necessary due to not all MySQL versions supporting sub-queries)

Try contacting Marcan - it may be that you can turn the "last FAQ in category" (which is executing this query) off in the module preferences

9
Chris03
Re: Smartfaq problems
  • 2005/3/27 5:22

  • Chris03

  • Quite a regular

  • Posts: 372

  • Since: 2004/2/22


fixed it by changing:

$sql4 = " SELECT ".$this->db->prefix('faq_faq').".categoryid, faqid, question, uid, ".$this->db->prefix('faq_faq').".datesub FROM ".$this->db->prefix('faq_faq').", tmp
WHERE ".$this->db->prefix('faq_faq').".categoryid=tmp.categoryid AND ".$this->db->prefix('faq_faq').".datesub=tmp.datesub;";


TO this


$sql4 = "SELECT categoryid, faqid, question, uid, MAX(datesub) AS datesub FROM ".$this->db->prefix("faq_faq")."
WHERE status IN (". implode(',', $status).")";


all is well now

thanks to those who helped!

Login

Who's Online

351 user(s) are online (49 user(s) are browsing Support Forums)


Members: 0


Guests: 351


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits