when i was with Mambo, smf and mambo-smf i didn't experience any problem but when i switched to Joomla, SMF 1.1 and Joomla-SMF bridge, Mysql just hang at 100% i studied it closely and i've seen that always when it hangs, there's one slow query:
Code:
SELECT jos.name, jos.username, jos.email, jos.registerDate, jos.block, jos.password, jos.activation, smf.memberName, smf.realName, smf.passwd, smf.emailAddress, smf.dateRegistered, smf.is_activated, smf.validation_code FROM mos_users jos RIGHT JOIN smf_members smf ON jos.username = smf.memberName WHERE jos.username = 'XXXX' OR smf.memberName = 'XXXX' LIMIT 1
and it needs around 5 - 10 mns to return to normal meanwhile the site is offline
I replaced the XXXX (the username to search for) with the last member registered and the query took 6 mins 10 seconds to finish, meanwhile SQL was 100% server load was 1.5 / 2 and site inaccessible
« Last Edit: October 09, 2005, 02:05:09 AM by Gandalf »
This site got 1300+ but it only takes couple of milliseconds. I can't see 6mins for 7000+ users. You need to optimize your tables from SMF or maybe from CPANEL (not sure at CPANEL).
« Last Edit: October 09, 2005, 02:11:12 AM by Editor (cowboy) »
can you please tell me how to rewrite it to avoide that problem? look above your 3 forms of the query worked but not the one you used in this function i guess it's better to rewrite it...
Thanks again for your help i appreciate it because my site is 70% down.. whenever a user login the site goes down for 6 mins....
This probably got something to do with your table index.
I'm really not sure how to explain it to you. It will take me more time telling you rather done modifying it myself.
But basically, the first SQL gets the Joomla and SMF user data base on Joomla. If not found, the 2nd SQL is tried based on SMF. And both are done through JOIN to save SQL call. Which should be an improvement. I really don't know what happened in your case.
If you want you can seperate the calls by not doing JOIN. But store the Joomla and SMF data in $row.
Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved. Terms of Use