Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-10859

Please consider to include a search timeout

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Icon: Major Major
    • 3.1.0-b1
    • None
    • Search
    • None

      Hi all!

      When you have a very big database (in my case: 4,5M posts), native phpBB search index is really slow to build up, and you are forced to use mysql or psql (still beta) fulltext search.

      But, in case a user will search for very common word, query will stay up (consuming resources) for a long time...

      Can you please consider to include a new option in admin panel to set up a query_search_max_time ?

      In psql should be something like:

      + $db->sql_query("SET statement_timeout TO '10s'");
      $result = $db->sql_query_limit($sql, $config['search_block_size'], $start);

      Where 10s may be a parameter defined by user in admin panel.

      Obvisiouly you need also to catch correctly the error in the db class, in order to not show a "SQL statement error" page...

      Thanks in advance if you'll consider to appy this change!

      Leo.

            nickvergessen Joas Schilling
            l3on l3on
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: