We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10612
    • 11 Posts
    what is it?
    all version of ajaxsearch dont work with modx-0.9.6.3-rc1
      • 21246
      • 55 Posts
      I also experience an error. Versions: 0.9.3-rc1 MODx and ajaxsearch 1.8.1

      The query crashes mysqld. I execute the query directly on the Mysql server and it crashes the server. Version 5.058

      Obviously I get a general parse error with lost connection to the db.

      Will have to break up the query to see what part is creating the error.  Anyone else?
        • 25663 MODX Staff
        • 12,272 Posts
        Please try the RC2, just released:

        http://modxcms.com/beta.html
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 21246
          • 55 Posts
          My versions are Versions: 0.9.3-rc2 MODx and ajaxsearch 1.8.1, I was at rc2 and then updated to rc3.

          I tested ajaxsearch 1.8.1 on a 0.9.2 install and experienced the same error on this server.

          Mysql version 5.058 with utf8 and utf8_general_ci collation.

          config.inc.php settings are;

          $database_connection_charset = 'utf8';
          $database_connection_method = 'SET CHARACTER SET';
          


          If I run the query directly on the db server it crashes. So the issue is related to the query in my case which is a simple on word query.

          The SQL that the parse error page displays is;

          SELECT sc.id, sc.pagetitle, sc.longtitle, sc.description, sc.alias, sc.introtext, sc.menutitle, sc.content, sc.publishedon, GROUP_CONCAT( DISTINCT CAST(ntv.id AS CHAR) SEPARATOR "," ) AS tv_id, GROUP_CONCAT( DISTINCT ntv.value SEPARATOR ", " ) AS tv_value FROM `antiques_site_content` sc LEFT JOIN( SELECT DISTINCT tv.id, tv.value, tv.contentid FROM `antiques_site_tmplvar_contentvalues` tv WHERE (((tv.value LIKE '%deco%'))) ) AS ntv ON sc.id = ntv.contentid WHERE ((sc.published=1) AND (sc.searchable=1) AND (sc.deleted=0) AND (sc.type='document') AND (sc.privateweb=0)) GROUP BY sc.id HAVING (((sc.pagetitle LIKE '%deco%') OR (sc.longtitle LIKE '%deco%') OR (sc.description LIKE '%deco%') OR (sc.alias LIKE '%deco%') OR (sc.introtext LIKE '%deco%') OR (sc.menutitle LIKE '%deco%') OR (sc.content LIKE '%deco%') OR (tv_value LIKE '%deco%'))) ORDER BY sc.publishedon,sc.pagetitle 



          FYI:
          Recently started moving clients and sites to MODx. It really is out of the BOX! Great community too. Am looking forward to assisting on this project and becoming a supportive member. Hats off to all.
            • 5811
            • 1,717 Posts
            Your query is correct. Could you post the mysql error message.

            You say that you get the same error directly under phpMyAdmin ? is it true ?
            If yes try the simplest query (tv not taken into account):
            SELECT sc.id, sc.pagetitle, sc.longtitle, sc.description, sc.alias, sc.introtext, sc.menutitle, sc.content, sc.publishedon 
            FROM `antiques_site_content` sc 
            WHERE (
            (sc.published=1) AND (sc.searchable=1) AND (sc.deleted=0) AND (sc.type='document') AND (sc.privateweb=0)
            ) 
            GROUP BY sc.id 
            HAVING (
            ((sc.pagetitle LIKE '%deco%') OR (sc.longtitle LIKE '%deco%') OR (sc.description LIKE '%deco%') 
            OR (sc.alias LIKE '%deco%') OR (sc.introtext LIKE '%deco%') OR (sc.menutitle LIKE '%deco%') 
            OR (sc.content LIKE '%deco%'))
            ) 
            ORDER BY sc.publishedon,sc.pagetitle 
            And let me know the result
              • 21246
              • 55 Posts
              Coroico, thanks for responding to my issue.

              I ran the query in a mysql client session and it causes the mysql server to crash.

              Here is the error logged in the mysqld.log from a search via a MODx page;

              081101 16:25:12 - mysqld got signal 11 ;
              This could be because you hit a bug. It is also possible that this binary
              or one of the libraries it was linked against is corrupt, improperly built,
              or misconfigured. This error can also be caused by malfunctioning hardware.
              We will try our best to scrape up some info that will hopefully help diagnose
              the problem, but since we have already crashed, something is definitely wrong
              and this may fail.

              key_buffer_size=8384512
              read_buffer_size=4194304
              max_used_connections=4
              max_connections=50
              threads_connected=1
              It is possible that mysqld could use up to
              key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 417788 K
              bytes of memory
              Hope that’s ok; if not, decrease some variables in the equation.

              thd=0x90affb0
              Attempting backtrace. You can use the following information to find out
              where mysqld died. If you see no messages after this, something went
              terribly wrong...
              Cannot determine thread, fp=0xb43bef28, backtrace may not be correct.
              Stack range sanity check OK, backtrace follows:
              0x81b0a58
              0x8507e0c
              0x822b348
              0x81fcb57
              0x820a090
              0x820a28d
              0x820a34c
              0x820a5d4
              0x8215ca7
              0x821783d
              0x82180cd
              0x81c8d3e
              0x81ccebb
              0x81cd40e
              Stack trace seems successful - bottom reached
              Please read http://dev.mysql.com/doc/mysql/en/using-stack-trace.html and follow instructions on how to resolve the stack trace. Resolved
              stack trace is much more helpful in diagnosing the problem, so please do
              resolve it
              Trying to get some variables.
              Some pointers may be invalid and cause the dump to abort...
              thd->query at 0x90dbac8 = SELECT sc.id, sc.pagetitle, sc.longtitle, sc.description, sc.alias, sc.introtext, sc.menutitle, sc.content, sc.publishedon, GROUP_CONCAT( DISTINCT CAST(ntv.id AS CHAR) SEPARATOR "," ) AS tv_id, GROUP_CONCAT( DISTINCT ntv.value SEPARATOR ", " ) AS tv_value FROM `antiques_site_content` sc LEFT JOIN( SELECT DISTINCT tv.id, tv.value, tv.contentid FROM `antiques_site_tmplvar_contentvalues` tv WHERE (((tv.value LIKE ’%deco%’))) ) AS ntv ON sc.id = ntv.contentid WHERE ((sc.published=1) AND (sc.searchable=1) AND (sc.deleted=0) AND (sc.type=’document’) AND (sc.privateweb=0)) GROUP BY sc.id HAVING (((sc.pagetitle LIKE ’%deco%’) OR (sc.longtitle LIKE ’%deco%’) OR (sc.description LIKE ’%deco%’) OR (sc.alias LIKE ’%deco%’) OR (sc.introtext LIKE ’%deco%’) OR (sc.menutitle LIKE ’%deco%’) OR (sc.content LIKE ’%deco%’) OR (tv_value LIKE ’%deco%’))) ORDER BY sc.publishedon,sc.pagetitle
              thd->thread_id=2368
              The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
              information that should help you find out what is causing the crash.

              I ran the query you provided and it returned results as expected. The snippet was being called simply.

              [!AjaxSearch? &ajaxSearch=`0` !]

              I also called it without the &ajaxSearch parameter and received similar results.

              I should note that this has been a trouble free mysql installation to this point.
                • 5811
                • 1,717 Posts
                I am not able to interpret this message huh
                Do you manage your own mysql server or is it a mysql server managed by a host provider ?

                Is somebody has the same kind of issue with version 5.058 ?

                The AjaxSearch demo runs on MySql 5.0.51a-log version without this kind of issues.
                  • 21246
                  • 55 Posts
                  I manage my own servers. This is a dedicated development server running Centos 5.2 that mirrors the production server environments I use. I will copy the database to another Development server and test the query to isolate the problem.

                  I will provide results of my investigation here.

                  Update Sun: 12:40 EST: I replicated the data to a 5.045 mysql instance and the query ran with no problems. I then upgraded the database server to 5.067 and ran the query and it crashes the mysql server. So at this point your query appears to not be compatible with at least version 5.058 to 5.067.

                  That should help with problem isolation.

                  I tested using a new MySQL server on a different hardware platform where the data was transferred to the new server. Remember that I had tested an additional MODx install on the other server so it is not the database. It is the server version.
                    • 21246
                    • 55 Posts
                    It may be related to MYSQL Bug #35298 - GROUP_CONCAT with DISTINCT can crash the server

                    http://bugs.mysql.com/bug.php?id=35298
                      • 25663 MODX Staff
                      • 12,272 Posts
                      Thanks for the research netdoctor and welcome aboard. smiley
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me