HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[SOLVED] Possible search related bugs?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#98676 (In Topic #19448)
Avatar

Community saint

Just wondering if anybody else is seeing any search related odd behaviors. I'm trying to determine if the behaviors are bugs or possible problems with my installation. I'm testing searches on my holleywoodstudio.com site (now running ocPortal v9.0.8, though I can't say for certain these are v9.0.8 specific) using the main_search block on the right side of the main page to initiate the searches. The only parameter specified for the main_search block is failsafe=1, no other parameters are specified. Some other details: Using the Google Chrome web browser, my web site admin account is an ocPortal logon with administrator privileges, my Jason account is a Facebook logon with super-moderator privileges. Here are a few scenarios and some of the behaviors I am seeing:

1. Doing a default search (News option checked for content type) for the word donate returns no results for the guest, admin, and Jason accounts. This is normal and expected since there is no news content with that keyword.

2. Doing a Page search (only the Page option is checked for the content type):
Logged out and browsing the site as guest (not masquerading as guest), a page search for the word donate returns 1 result for the Adminzone Start page. Should guests be getting links to the Admin Zone or other zones they aren't a member of? I can see the possible benefit of allowing non-members to see certain search results from members-only zones as a way to encourage membership, but maybe the admin and cms zones can be filtered out by default? Logged in as admin or Jason and performing the same search returns 2 results and displays both results. Both are the same and linking to the same Adminzone Start page. Can the search filter out duplicate results or is this possibly a side effect caused by using the more friendly urls like adminzone/pg/start instead of adminzone/index.php?

3. Doing a Catalogue Categories search (only the Catalogue Categories option is checked):
Doing a search for the word donate returns 1 result for guest, admin, and Jason accounts. This is normal and expected since there is only one category for donations.

4. Doing a Catalogue Entries search (only the Catalogue Entries option is checked):
This is where things get really interesting O_o  Logged in as guest or admin, doing a search for the word donate says it found 96 results, but only displays 8 since there are really only 8 catalog entries that contain the keyword. Is each entry somehow being counted 12 times? (8 entries x 12 = 96 results?) Since it found 96 results, there are pagination links for 10 pages at the bottom of the search results page. But only page 1 contains the 8 actual catalog entries found, the rest of the page links don't display any results. Now the big one: Doing this same Catalogue Entries search logged in as Jason with a Facebook logon takes down the whole web site for a period of time...seems to take about 20 minutes before the site starts responding again to http requests. Looking in the hosting account cPanel, it looks like iframe.php is getting hung up and I can't seem to kill it from the cPanel and have to wait for things to timeout. While waiting, I can see some additional iframe.php processes are being spawned but I can't tell how or why. I don't always get an error in the cPanel error log for my site when this happens, but when I do, these are the two errors I get when this happens:
 

Code


[Sat Jul 13 13:20:37 2013] [error] [client <my-home-ip-address>] File does not exist: /home****/holleywoodstudio.com/504.shtml, referer: http://www.holleywoodstudio.com/data/iframe.php?zone=&utheme=Red_V9&page=search&type=results&content=donate&all_defaults=1&author=&days=-1&sort=relevance&direction=DESC&only_titles=0&only_search_meta=0&boolean_search=0&conjunctive_operator=AND
[Sat Jul 13 13:16:28 2013] [warn] [client <my-home-ip-address>] Timeout waiting for output from CGI script /home****/holleywoodstudio.com/data/iframe.php, referer: http://www.holleywoodstudio.com/data/iframe.php?zone=&utheme=Red_V9&page=search&type=results&content=donate&all_defaults=1&author=&days=-1&sort=relevance&direction=DESC&only_titles=0&only_search_meta=0&boolean_search=0&conjunctive_operator=AND
 


5. I'm not sure when this one creeped in, but I'm getting a bail out when doing a member search where the search keyword is more than 3 characters long when logged in as admin or Jason.  3 characters or shorter and the member search works. It appears to be database related with a query failure. I'm not sure if it's related to a custom profile field I added (I think only 1 checkbox option was added), a glitch when moving the database to the new host, or an addon I have installed. For example, if I search for jas, I get a search result for my Jason user account (actually it says it found 2 results, but only displays 1 since only 1 account matches) and does the same when logged out and browsing as guest. If I search for jaso, I get no search results (I expected it to also return a match on my Jason account) when logged out and browsing as guest, but returns a critical error when logged in as admin or Jason. If I search for jason, I get a search result (it says it found 2 results, but only displays 1 since only 1 account matches) when logged out and browsing as guest, but returns a critical error when logged in as admin or Jason. Searching for zzz returns no results as expected. Here is the critical error searching for zzzz which should also return no results:

Code


 
Critical error – bailing out
 
This is an error that has been elevated to critical error status because it occurred during the primary error mechanism reporting system itself (possibly due to it occuring within the standard output framework). It may be masking a secondary error that occurred before this, but was never output - if so, it is likely strongly related to this one, thus fixing this will fix the other.
 
Unfortunately a query has failed [SELECT ((SELECT COUNT(*) FROM (SELECT 1 FROM ocp_f_members r JOIN ocp_f_member_custom_fields a on r.id=a.mf_member_id JOIN ocp_translate t1 on t1.id=m_signature AND t1.language='EN' WHERE MATCH (t1.text_original) AGAINST ('zzzz') LIMIT 1000) counter)+(SELECT COUNT(*) FROM (SELECT 1 FROM ocp_f_members r JOIN ocp_f_member_custom_fields a on r.id=a.mf_member_id JOIN ocp_translate t2 on t2.id=field_7 AND t2.language='EN' WHERE MATCH (t2.text_original) AGAINST ('zzzz') LIMIT 1000) counter)+(SELECT COUNT(*) FROM (SELECT 1 FROM ocp_f_members r JOIN ocp_f_member_custom_fields a on r.id=a.mf_member_id WHERE MATCH (m_username) AGAINST ('zzzz') AND (m_username IS NOT NULL) LIMIT 1000) counter)+(SELECT COUNT(*) FROM (SELECT 1 FROM ocp_f_members r JOIN ocp_f_member_custom_fields a on r.id=a.mf_member_id WHERE MATCH (field_2) AGAINST ('zzzz') AND (field_2 IS NOT NULL) LIMIT 1000) counter)+(SELECT COUNT(*) FROM (SELECT 1 FROM ocp_f_members r JOIN ocp_f_member_custom_fields a on r.id=a.mf_member_id WHERE MATCH (field_3) AGAINST ('zzzz') AND (field_3 IS NOT NULL) LIMIT 1000) counter)+(SELECT COUNT(*) FROM (SELECT 1 FROM ocp_f_members r JOIN ocp_f_member_custom_fields a on r.id=a.mf_member_id WHERE MATCH (field_5) AGAINST ('zzzz') AND (field_5 IS NOT NULL) LIMIT 1000) counter)+(SELECT COUNT(*) FROM (SELECT 1 FROM ocp_f_members r JOIN ocp_f_member_custom_fields a on r.id=a.mf_member_id WHERE MATCH (field_6) AGAINST ('zzzz') AND (field_6 IS NOT NULL) LIMIT 1000) counter)+(SELECT COUNT(*) FROM (SELECT 1 FROM ocp_f_members r JOIN ocp_f_member_custom_fields a on r.id=a.mf_member_id WHERE MATCH (field_19) AGAINST ('zzzz') AND (field_19 IS NOT NULL) LIMIT 1000) counter)+(SELECT COUNT(*) FROM (SELECT 1 FROM ocp_f_members r JOIN ocp_f_member_custom_fields a on r.id=a.mf_member_id WHERE MATCH (field_20) AGAINST ('zzzz') AND (field_20 IS NOT NULL) LIMIT 1000) counter)+(SELECT COUNT(*) FROM (SELECT 1 FROM ocp_f_members r JOIN ocp_f_member_custom_fields a on r.id=a.mf_member_id WHERE MATCH (field_21) AGAINST ('zzzz') AND (field_21 IS NOT NULL) LIMIT 1000) counter)+(SELECT COUNT(*) FROM (SELECT 1 FROM ocp_f_members r JOIN ocp_f_member_custom_fields a on r.id=a.mf_member_id WHERE MATCH (field_22) AGAINST ('zzzz') AND (field_22 IS NOT NULL) LIMIT 1000) counter)+(SELECT COUNT(*) FROM (SELECT 1 FROM ocp_f_members r JOIN ocp_f_member_custom_fields a on r.id=a.mf_member_id WHERE MATCH (field_23) AGAINST ('zzzz') AND (field_23 IS NOT NULL) LIMIT 1000) counter)+(SELECT COUNT(*) FROM (SELECT 1 FROM ocp_f_members r JOIN ocp_f_member_custom_fields a on r.id=a.mf_member_id WHERE MATCH (field_24) AGAINST ('zzzz') AND (field_24 IS NOT NULL) LIMIT 1000) counter)+(SELECT COUNT(*) FROM (SELECT 1 FROM ocp_f_members r JOIN ocp_f_member_custom_fields a on r.id=a.mf_member_id WHERE MATCH (field_25) AGAINST ('zzzz') AND (field_25 IS NOT NULL) LIMIT 1000) counter)+(SELECT COUNT(*) FROM (SELECT 1 FROM ocp_f_members r JOIN ocp_f_member_custom_fields a on r.id=a.mf_member_id WHERE MATCH (field_34) AGAINST ('zzzz') AND (field_34 IS NOT NULL) LIMIT 1000) counter)) LIMIT 1] [Can't find FULLTEXT index matching the column list] (version: 9.0.8, PHP version: 5.3.26, URL: /data/iframe.php?page=search&type=results&zone=&content=zzzz&author=&days=-1&sort=relevance&direction=ASC&search_ocf_members=1&search_news=1)
 
 
Stack trace…
 
File -> '/home****/holleywoodstudio.com/sources/failure.php'
 Line -> 792
 Function -> 'die_html_trace'
 Args -> array
 
 
File -> '/home****/holleywoodstudio.com/sources/global2.php'
 Line -> 1012
 Function -> '_fatal_exit'
 Args -> array
 
 
File -> '/home****/holleywoodstudio.com/sources/database/mysql.php'
 Line -> 253
 Function -> 'fatal_exit'
 Args -> array
 
 
File -> '/home****/holleywoodstudio.com/sources/database.php'
 Line -> 1103
 Function -> 'db_query'
 Class -> 'Database_Static_mysql'
 Object -> Database_Static_mysql::__set_state(array( ))
 Type -> '->'
Args -> array
 
 
File -> '/home****/holleywoodstudio.com/sources/database.php'
 Line -> 951
 Function -> '_query'
 Class -> 'database_driver'
 Object -> database_driver::__set_state(array( 'table_prefix' => 'ocp_', 'connection_read' => array ( 0 => NULL, 1 => '****_****_ocportal', ), 'connection_write' => array ( 0 => NULL, 1 => '****_****_ocportal', ), 'text_lookup_original_cache' => array ( 7 => 'Welcome', 1 => 'Holleywood Studio Productions', 72 => '', 73 => '', 32 => 'Administrators', 34 => 'Super-moderators', 36 => 'Super-members', 38 => 'Local hero', 40 => 'Old timer', 42 => 'Local', 17492 => 'Web Show', 33 => 'Site director', 35 => 'Site staff', 37 => 'Super-member', 39 => 'Standard member', 41 => 'Standard member', 43 => 'Standard member', 17493 => '', 8 => 'Admin', 11 => 'Content Management', 14 => 'Forums', 550 => 'H-Factor', 19675 => 'Pie Tart 2', 6248 => 'personalzone', 587 => 'Pie Tart', 9 => 'Site', 12386 => 'Zone Template', 2 => 'Admin Zone', 5 => 'Content Management', 12 => 'Forum', 551 => '', 19676 => '', 6249 => 'personalzone', 588 => '', 4 => 'A site about ???', 12387 => '', 16 => 'About me', 18 => 'MSN Messenger ID', 20 => 'Skype ID', 22 => 'Interests', 24 => 'Location', 26 => 'Occupation', 28 => 'Staff notes', 83 => 'ocp_mobile_phone_number', 310 => 'ocp_points_gained_seedy', 323 => 'ocp_points_gained_chat', 359 => 'ocp_currency', 361 => 'ocp_payment_cardholder_name', 363 => 'ocp_payment_type', 365 => 'ocp_payment_card_number', 367 => 'ocp_payment_card_start_date', 369 => 'ocp_payment_card_expiry_date', 371 => 'ocp_payment_card_issue_number', 373 => 'ocp_payment_card_cv2', 391 => 'ocp_firstname', 393 => 'ocp_lastname', 395 => 'ocp_building_name_or_number', 397 => 'ocp_city', 399 => 'ocp_state', 401 => 'ocp_post_code', 403 => 'ocp_country', 435 => 'ocp_points_used', 437 => 'ocp_gift_points_used', 439 => 'ocp_points_gained_given', 441 => 'ocp_points_gained_rating', 443 => 'ocp_points_gained_voting', 445 => 'ocp_sites', 447 => 'ocp_role', 449 => 'ocp_fullname', 7638 => 'Show Flash Content', 17 => 'Some personally written information.', 19 => 'E-mail address of MSN Messenger account.', 21 => 'Skype username.', 23 => 'A summary of your interests.', 25 => 'Your geographical location.', 27 => 'Your occupation.', 29 => 'Notes on this member, only viewable by staff.', 84 => 'This should be the mobile phone number in international format, devoid of any national or international outgoing access codes. For instance, a typical UK (44) number might be nationally known as \'01234 123456\', but internationally and without outgoing access codes would be \'441234123456\'.', 311 => '', 324 => '', 360 => '', 362 => '', 364 => '', 366 => '', 368 => '', 370 => '', 372 => '', 374 => '', 392 => '', 394 => '', 396 => '', 398 => '', 400 => '', 402 => '', 404 => '', 436 => '', 438 => '', 440 => '', 442 => '', 444 => '', 446 => '', 448 => '', 450 => '', 7639 => 'Our site header contains a flash logo and other areas may contain flash content which requires an Adobe plugin for your web browser. If your computer is old or slow or you just don\'t want this flash content, uncheck to disable this flash content.', ), 'text_lookup_cache' => array ( 7 => '', 1 => '', 72 => '', 73 => '', 32 => '', 34 => '', 36 => '', 38 => '', 40 => '', 42 => '', 17492 => '', 33 => '', 35 => '', 37 => '', 39 => '', 41 => '', 43 => '', 17493 => '', 8 => '', 11 => '', 14 => '', 550 => '', 19675 => '', 6248 => '', 587 => '', 9 => '', 12386 => '', 2 => '', 5 => '', 12 => '', 551 => '', 19676 => '', 6249 => '', 588 => '', 4 => '', 12387 => '', 16 => '', 18 => '', 20 => '', 22 => '', 24 => '', 26 => '', 28 => '', 83 => '', 310 => '', 323 => '', 359 => '', 361 => '', 363 => '', 365 => '', 367 => '', 369 => '', 371 => '', 373 => '', 391 => '', 393 => '', 395 => '', 397 => '', 399 => '', 401 => '', 403 => '', 435 => '', 437 => '', 439 => '', 441 => '', 443 => '', 445 => '', 447 => '', 449 => '', 7638 => '', 17 => '', 19 => '', 21 => '', 23 => '', 25 => '', 27 => '', 29 => '', 84 => '', 311 => '', 324 => '', 360 => '', 362 => '', 364 => '', 366 => '', 368 => '', 370 => '', 372 => '', 374 => '', 392 => '', 394 => '', 396 => '', 398 => '', 400 => '', 402 => '', 404 => '', 436 => '', 438 => '', 440 => '', 442 => '', 444 => '', 446 => '', 448 => '', 450 => '', 7639 => '', ), 'table_exists_cache' => array ( ), 'static_ob' => Database_Static_mysql::__set_state(array( )), 'dedupe_mode' => true, ))
 Type -> '->'
Args -> array
 
 
File -> '/home****/holleywoodstudio.com/sources/database.php'
 Line -> 644
 Function -> 'query'
 Class -> 'database_driver'
 Object -> database_driver::__set_state(array( 'table_prefix' => 'ocp_', 'connection_read' => array ( 0 => NULL, 1 => '****_****_ocportal', ), 'connection_write' => array ( 0 => NULL, 1 => '****_****_ocportal', ), 'text_lookup_original_cache' => array ( 7 => 'Welcome', 1 => 'Holleywood Studio Productions', 72 => '', 73 => '', 32 => 'Administrators', 34 => 'Super-moderators', 36 => 'Super-members', 38 => 'Local hero', 40 => 'Old timer', 42 => 'Local', 17492 => 'Web Show', 33 => 'Site director', 35 => 'Site staff', 37 => 'Super-member', 39 => 'Standard member', 41 => 'Standard member', 43 => 'Standard member', 17493 => '', 8 => 'Admin', 11 => 'Content Management', 14 => 'Forums', 550 => 'H-Factor', 19675 => 'Pie Tart 2', 6248 => 'personalzone', 587 => 'Pie Tart', 9 => 'Site', 12386 => 'Zone Template', 2 => 'Admin Zone', 5 => 'Content Management', 12 => 'Forum', 551 => '', 19676 => '', 6249 => 'personalzone', 588 => '', 4 => 'A site about ???', 12387 => '', 16 => 'About me', 18 => 'MSN Messenger ID', 20 => 'Skype ID', 22 => 'Interests', 24 => 'Location', 26 => 'Occupation', 28 => 'Staff notes', 83 => 'ocp_mobile_phone_number', 310 => 'ocp_points_gained_seedy', 323 => 'ocp_points_gained_chat', 359 => 'ocp_currency', 361 => 'ocp_payment_cardholder_name', 363 => 'ocp_payment_type', 365 => 'ocp_payment_card_number', 367 => 'ocp_payment_card_start_date', 369 => 'ocp_payment_card_expiry_date', 371 => 'ocp_payment_card_issue_number', 373 => 'ocp_payment_card_cv2', 391 => 'ocp_firstname', 393 => 'ocp_lastname', 395 => 'ocp_building_name_or_number', 397 => 'ocp_city', 399 => 'ocp_state', 401 => 'ocp_post_code', 403 => 'ocp_country', 435 => 'ocp_points_used', 437 => 'ocp_gift_points_used', 439 => 'ocp_points_gained_given', 441 => 'ocp_points_gained_rating', 443 => 'ocp_points_gained_voting', 445 => 'ocp_sites', 447 => 'ocp_role', 449 => 'ocp_fullname', 7638 => 'Show Flash Content', 17 => 'Some personally written information.', 19 => 'E-mail address of MSN Messenger account.', 21 => 'Skype username.', 23 => 'A summary of your interests.', 25 => 'Your geographical location.', 27 => 'Your occupation.', 29 => 'Notes on this member, only viewable by staff.', 84 => 'This should be the mobile phone number in international format, devoid of any national or international outgoing access codes. For instance, a typical UK (44) number might be nationally known as \'01234 123456\', but internationally and without outgoing access codes would be \'441234123456\'.', 311 => '', 324 => '', 360 => '', 362 => '', 364 => '', 366 => '', 368 => '', 370 => '', 372 => '', 374 => '', 392 => '', 394 => '', 396 => '', 398 => '', 400 => '', 402 => '', 404 => '', 436 => '', 438 => '', 440 => '', 442 => '', 444 => '', 446 => '', 448 => '', 450 => '', 7639 => 'Our site header contains a flash logo and other areas may contain flash content which requires an Adobe plugin for your web browser. If your computer is old or slow or you just don\'t want this flash content, uncheck to disable this flash content.', ), 'text_lookup_cache' => array ( 7 => '', 1 => '', 72 => '', 73 => '', 32 => '', 34 => '', 36 => '', 38 => '', 40 => '', 42 => '', 17492 => '', 33 => '', 35 => '', 37 => '', 39 => '', 41 => '', 43 => '', 17493 => '', 8 => '', 11 => '', 14 => '', 550 => '', 19675 => '', 6248 => '', 587 => '', 9 => '', 12386 => '', 2 => '', 5 => '', 12 => '', 551 => '', 19676 => '', 6249 => '', 588 => '', 4 => '', 12387 => '', 16 => '', 18 => '', 20 => '', 22 => '', 24 => '', 26 => '', 28 => '', 83 => '', 310 => '', 323 => '', 359 => '', 361 => '', 363 => '', 365 => '', 367 => '', 369 => '', 371 => '', 373 => '', 391 => '', 393 => '', 395 => '', 397 => '', 399 => '', 401 => '', 403 => '', 435 => '', 437 => '', 439 => '', 441 => '', 443 => '', 445 => '', 447 => '', 449 => '', 7638 => '', 17 => '', 19 => '', 21 => '', 23 => '', 25 => '', 27 => '', 29 => '', 84 => '', 311 => '', 324 => '', 360 => '', 362 => '', 364 => '', 366 => '', 368 => '', 370 => '', 372 => '', 374 => '', 392 => '', 394 => '', 396 => '', 398 => '', 400 => '', 402 => '', 404 => '', 436 => '', 438 => '', 440 => '', 442 => '', 444 => '', 446 => '', 448 => '', 450 => '', 7639 => '', ), 'table_exists_cache' => array ( ), 'static_ob' => Database_Static_mysql::__set_state(array( )), 'dedupe_mode' => true, ))
 Type -> '->'
Args -> array
 
 
File -> '/home****/holleywoodstudio.com/sources/database_search.php'
 Line -> 736
 Function -> 'query_value_null_ok_full'
 Class -> 'database_driver'
 Object -> database_driver::__set_state(array( 'table_prefix' => 'ocp_', 'connection_read' => array ( 0 => NULL, 1 => '****_****_ocportal', ), 'connection_write' => array ( 0 => NULL, 1 => '****_****_ocportal', ), 'text_lookup_original_cache' => array ( 7 => 'Welcome', 1 => 'Holleywood Studio Productions', 72 => '', 73 => '', 32 => 'Administrators', 34 => 'Super-moderators', 36 => 'Super-members', 38 => 'Local hero', 40 => 'Old timer', 42 => 'Local', 17492 => 'Web Show', 33 => 'Site director', 35 => 'Site staff', 37 => 'Super-member', 39 => 'Standard member', 41 => 'Standard member', 43 => 'Standard member', 17493 => '', 8 => 'Admin', 11 => 'Content Management', 14 => 'Forums', 550 => 'H-Factor', 19675 => 'Pie Tart 2', 6248 => 'personalzone', 587 => 'Pie Tart', 9 => 'Site', 12386 => 'Zone Template', 2 => 'Admin Zone', 5 => 'Content Management', 12 => 'Forum', 551 => '', 19676 => '', 6249 => 'personalzone', 588 => '', 4 => 'A site about ???', 12387 => '', 16 => 'About me', 18 => 'MSN Messenger ID', 20 => 'Skype ID', 22 => 'Interests', 24 => 'Location', 26 => 'Occupation', 28 => 'Staff notes', 83 => 'ocp_mobile_phone_number', 310 => 'ocp_points_gained_seedy', 323 => 'ocp_points_gained_chat', 359 => 'ocp_currency', 361 => 'ocp_payment_cardholder_name', 363 => 'ocp_payment_type', 365 => 'ocp_payment_card_number', 367 => 'ocp_payment_card_start_date', 369 => 'ocp_payment_card_expiry_date', 371 => 'ocp_payment_card_issue_number', 373 => 'ocp_payment_card_cv2', 391 => 'ocp_firstname', 393 => 'ocp_lastname', 395 => 'ocp_building_name_or_number', 397 => 'ocp_city', 399 => 'ocp_state', 401 => 'ocp_post_code', 403 => 'ocp_country', 435 => 'ocp_points_used', 437 => 'ocp_gift_points_used', 439 => 'ocp_points_gained_given', 441 => 'ocp_points_gained_rating', 443 => 'ocp_points_gained_voting', 445 => 'ocp_sites', 447 => 'ocp_role', 449 => 'ocp_fullname', 7638 => 'Show Flash Content', 17 => 'Some personally written information.', 19 => 'E-mail address of MSN Messenger account.', 21 => 'Skype username.', 23 => 'A summary of your interests.', 25 => 'Your geographical location.', 27 => 'Your occupation.', 29 => 'Notes on this member, only viewable by staff.', 84 => 'This should be the mobile phone number in international format, devoid of any national or international outgoing access codes. For instance, a typical UK (44) number might be nationally known as \'01234 123456\', but internationally and without outgoing access codes would be \'441234123456\'.', 311 => '', 324 => '', 360 => '', 362 => '', 364 => '', 366 => '', 368 => '', 370 => '', 372 => '', 374 => '', 392 => '', 394 => '', 396 => '', 398 => '', 400 => '', 402 => '', 404 => '', 436 => '', 438 => '', 440 => '', 442 => '', 444 => '', 446 => '', 448 => '', 450 => '', 7639 => 'Our site header contains a flash logo and other areas may contain flash content which requires an Adobe plugin for your web browser. If your computer is old or slow or you just don\'t want this flash content, uncheck to disable this flash content.', ), 'text_lookup_cache' => array ( 7 => '', 1 => '', 72 => '', 73 => '', 32 => '', 34 => '', 36 => '', 38 => '', 40 => '', 42 => '', 17492 => '', 33 => '', 35 => '', 37 => '', 39 => '', 41 => '', 43 => '', 17493 => '', 8 => '', 11 => '', 14 => '', 550 => '', 19675 => '', 6248 => '', 587 => '', 9 => '', 12386 => '', 2 => '', 5 => '', 12 => '', 551 => '', 19676 => '', 6249 => '', 588 => '', 4 => '', 12387 => '', 16 => '', 18 => '', 20 => '', 22 => '', 24 => '', 26 => '', 28 => '', 83 => '', 310 => '', 323 => '', 359 => '', 361 => '', 363 => '', 365 => '', 367 => '', 369 => '', 371 => '', 373 => '', 391 => '', 393 => '', 395 => '', 397 => '', 399 => '', 401 => '', 403 => '', 435 => '', 437 => '', 439 => '', 441 => '', 443 => '', 445 => '', 447 => '', 449 => '', 7638 => '', 17 => '', 19 => '', 21 => '', 23 => '', 25 => '', 27 => '', 29 => '', 84 => '', 311 => '', 324 => '', 360 => '', 362 => '', 364 => '', 366 => '', 368 => '', 370 => '', 372 => '', 374 => '', 392 => '', 394 => '', 396 => '', 398 => '', 400 => '', 402 => '', 404 => '', 436 => '', 438 => '', 440 => '', 442 => '', 444 => '', 446 => '', 448 => '', 450 => '', 7639 => '', ), 'table_exists_cache' => array ( ), 'static_ob' => Database_Static_mysql::__set_state(array( )), 'dedupe_mode' => true, ))
 Type -> '->'
Args -> array
 
 
File -> '/home****/holleywoodstudio.com/sources/hooks/modules/search/ocf_members.php'
 Line -> 272
 Function -> 'get_search_rows'
 Args -> array
 
 
File -> '/home****/holleywoodstudio.com/site/pages/modules/search.php'
 Line -> 684
 Function -> 'run'
 Class -> 'Hook_search_ocf_members'
 Object -> Hook_search_ocf_members::__set_state(array( ))
 Type -> '->'
Args -> array ( 0 => 'zzzz', 1 => false, 2 => 'ASC', 3 => 10, 4 => 0, 5 => false, 6 => 'MATCH (?) AGAINST (\'zzzz\') AND (? IS NOT NULL)', 7 => '', 8 => NULL, 9 => NULL, 10 => 'relevance', 11 => 10, 12 => 'OR', 13 => '', 14 => '!', 15 => 0, )
 
 
File -> '/home****/holleywoodstudio.com/site/pages/modules/search.php'
 Line -> 546
 Function -> 'results'
 Class -> 'Module_search'
 Object -> Module_search::__set_state(array( ))
 Type -> '->'
Args -> array ( 0 => '', 1 => '', 2 => NULL, 3 => -1, 4 => 'relevance', 5 => 'ASC', 6 => false, 7 => '!', )
 
 
File -> '/home****/holleywoodstudio.com/site/pages/modules/search.php'
 Line -> 262
 Function -> 'form'
 Class -> 'Module_search'
 Object -> Module_search::__set_state(array( ))
 Type -> '->'
Args -> array ( )
 
 
File -> '/home****/holleywoodstudio.com/sources/zones.php'
 Line -> 425
 Function -> 'run'
 Class -> 'Module_search'
 Object -> Module_search::__set_state(array( ))
 Type -> '->'
Args -> array ( )
 
 
File -> '/home****/holleywoodstudio.com/sources/site.php'
 Line -> 858
 Function -> 'load_module_page'
 Args -> array ( 0 => 'site/pages/modules/search.php', 1 => 'search', )
 
 
File -> '/home****/holleywoodstudio.com/sources/misc_scripts.php'
 Line -> 233
 Function -> 'request_page'
 Args -> array ( 0 => 'search', 1 => true, )
 
 
File -> '/home****/holleywoodstudio.com/data/iframe.php'
 Line -> 37
 Function -> 'iframe_script'
 Args -> array ( )


I have another site running v9.0.7 that I will be upgrading. Before I do, I will setup a Facebook logon there as well to see if there is a solid link between Catalogue Entries search and the web site going down when logged in via Facebook or if it's something else specific to just that one site. I can confirm that the discrepancy between what the search results page says for the number of results that were found and the actual number of results that are displayed and the number of pagination links not being correct does also exist on v9.0.7. I also checked the member search on the other site and I can confirm it doesn't bail out, but I still suspect a database problem, custom profile field problem, or possibly an addon problem rather than a v9.0.8 upgrade problem.
Back to the top
 
Posted
Item has a rating of 5 (Liked by Jason Verhagen)  
Rating:
#98692
Avatar

The Comcode page one is a definite bug. This will be in the bug fix.

Is each entry somehow being counted 12 times? (8 entries x 12 = 96 results?) Since it found 96 results, there are pagination links for 10 pages at the bottom of the search results page. But only page 1 contains the 8 actual catalog entries found

If the entries are using the keyword in multiple fields, this will happen. A similar issue happens on Google, it's very difficult to de-duplicate it while maintaining performance on large data sets.

takes down the whole web site for a period of time

Do you have a very large number of catalogue entries? We have found different MySQL versions unfortunately have wildly different performance characteristics when it comes to full-text search over joins, which is what the search will do.
We have gone over this for a number of users, then it seems some other MySQL version has a different problem :(.

In theory this OcCLE command can switch over to a slightly different method, but it is unofficial and not tested in a while:

Code

:set_value('alternate_search_join_type','1');

You should be able to see what query is causing the problem via the MySQL console, using SHOW FULL PROCESSLIST.
You can then try EXPLAIN <query> to give a very rough (very rough) estimate of how MySQL would compute it.
I may be able to advise.

Btw you can kill a query manually with KILL <id> – that is the best way to manually intervene, it avoids you needing to wait or reset everything.

Also, what's your MySQL version?

While waiting, I can see some additional iframe.php processes are being spawned but I can't tell how or why.

MySQL has no mechanism to terminate a long running query. It will create a read lock while searching, which locks any other requests trying to write to that table.
Therefore requests from other users may be queued.
Additionally, I think some browsers now send multiple requests if a GET request is stalled, to try and unstick it.

I expected it to also return a match on my Jason account

Full-text search won't do partial word matches like this, unless it matches stemming in English grammar. E.g. "belonging" and "belong" would match each other but "giving" and "gave" will not.
Boolean search can do better, but is slow as it cannot use indexes.

Can't find FULLTEXT index matching the column list

In the past we have had issues with indexes not properly creating. In fact, MySQL has a limit, and I see there are a lot of field IDs coming up here. We have to stop creating indexes when we get to the limit.

I can see we need to adjust our code to skip any field that has no index. This will be in the bug fix.

This is how to create an index in PHP code:

Code

require_code('database_action');
$GLOBALS['FORUM_DB']->create_index('f_member_custom_fields','#mcf'.strval($id),array('field_'.strval($id)),'mf_member_id');
(where $id is the CPF ID)

The "#" means fulltext index. For an integer column you would omit it.
For a "translated" column (i.e. one that goes through the translate table) you don't need an index, as the index exists on the translate table already.

and to delete:

Code

require_code('database_action');
$GLOBALS['FORUM_DB']->delete_index_if_exists('f_member_custom_fields','#mcf'.strval($id));

This should let you tune which ones have indexes.


I don't think any of this will be 9.0.8-specific.


Last edit: by Chris Graham


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Item has a rating of 5 (Liked by Jason Verhagen)  
Rating:
#98693
Avatar

A bit more on MySQL performance…

It really comes down to MySQL picking an appropriate index, and be able to run the joins efficiently, again involving an index. So indexing for the actual query, then indexing so it can quickly connect rows together across tables without having to do table scans to find the match.

MySQL tends to have bugs where it picks the wrong index, or none at all.

If a query on a large dataset is not indexed, it can easily take 20 minutes instead of 0.5 seconds.

This is why our search actually runs a search on each field separately, rather than doing one big catalogue search query. MySQL cannot do full-text searches on multiple fields "at once" if they're not all the on the same table.

More complex problems come when index files themselves get very large, or when different table reads and writes are causing locks, causing a request queue to build up and basically taking a server down, because the thing that causes the lock can then run out of memory/CPU due to the queue forming behind it. We've pretty much solved this kind of problem in ocPortal now though, as we have some intelligence on when to allow requests to queue up or when to jump over trivial bookkeeping operations.

When testing query performance in MySQL it is important to run this first:

Code

SET SESSION query_cache_type=0;
Otherwise the MySQL query cache will interfere.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Item has a rating of 5 (Liked by Jason Verhagen)  
Rating:
#98694
Avatar



Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#98696
Avatar

Community saint

Chris, thanks for fix and the explanations and information. 

Here are some updates:

Running mySQL v5.5.30-30.1

I applied the posted fix and that works for taking care of the pages search issue but still had bail out on member searches with search string longer than 3 characters.

Using phpmyadmin, I added the fulltext index to all of the text based fields in the f_custom_fields table and still had the bail out on member searches when the search string was more than 3 characters long. I noticed m_username in the stack trace and added a fulltext index on that field of the f_members table as well. That appears to have solved that issue searching for members. I did notice too that mySQL would only let me do 16 fields at a time when creating the fulltext indexes. Selecting more caused the query to fail.

I did try to recreate the web site crash using the Catalogue Entries search on my tfo.net site running 9.0.7 and wasn't able to. Even after upgrading it to 9.0.8 I couldn't recreate the crash. As far as catologs go, the tfo.net site only has about a dozen entries for a Links catalog and holleywoodstudio.com has less than two dozen entries combined in Links and Products catalogs. I did serveral changes and updates since last night on the holleywoodstudio.com web site and so far I haven't been able to recreate the crash there. So I'm hoping between the bug fixes and my fiddling, the site won't crash on Catalogue Entries searches.

For the changes and updates I've done, here is what I did: I have done a full refresh of the ocPortal and addon files for the site. I know it's probably overkill, but at least now I know for certain that all of the files are fresh and there shouldn't be any left over that I may have tampered with (though, I didn't see anything in the File Integrity Scan that would be an issue). First I downloaded the whole site and database to my PC for a backup. I downloaded the v9.0.8 manual extractor archive and extracted it locally to a new folder, deleted several files like install.php, info.php, some files from data_custom, and a few other that I didn't want to overwrite on the server. Then I uploaded the files over the files on the server, ran the upgrade tool to update the database for some bundled addons I had previously removed that were uploaded from the manual extractor archive, and then ran a file integrity scan. The only override file I had was symbols.php and I didn't need that override so I checked it for deletion. All of the alien files in the list were expected, so I left all unchecked. In the 'probably should be deleted if you have done a major upgrade' part of the list, I opted to just check all for deletion and reinstall the non-bundled addons. once all of those files were deleted, in Structure->Addons I re-removed the addons I'm not using and then re-downloaded all of the extra addons and allowed them to install. In Tools->Website Cleanup Tools I ran the two mySQL optimiser options and the cache related de-cacher options. I didn't write down what the mySQL optimiser did, but it was something related to the chat addon. The last thing I did was check the .htaccess file and noticed a couple of items I changed for the old web host and didn't change back for the new web host. on the old web host I had the mod_security SecRuleRemoveById line commented out, and the memory_limit lowered to 96M while playing with mod_php. The memory_limit isn't an issue since Arvixe doesn't run mod_php and requires those settings to be set in php.ini instead of .htaccess, but I'm not sure about the impact of the mod_security setting.

After all of that and applying the bug fix, the crash and bail outs appear to be gone.

on a side note, has anybody ever noticed that the message forum here converts an uppercase O and/or N to lowercase when you place those two letters together. 
Back to the top
 
Posted
Rating:
#98698
Avatar

would only let me do 16 fields at a time when creating the fulltext indexes

Ah. I suppose we'd better put in a limit in the code for that too. I'll check that out soon.

I noticed m_username in the stack trace and added a fulltext index on that field of the f_members table as well

Ah, yes. This is there by default, so perhaps this had gone missing.

on a side note, has anybody ever noticed that the message forum here converts an uppercase O and/or N to lowercase when you place those two letters together.

This will be part of the anti-Javascript filter (think: onclick). But a bug, it's not meant to lowercase it.


Last edit: by Chris Graham


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: