Users with many email addresses get no results

Issue #581 resolved
Pod Andrews created an issue

Hello

Firstly, thanks for a great product. (We're using version 1.1.0)

We have an environment where each user can work in many departments. This leads to them needing access to a LOT (250+) of email addresses in mailpiler. The logs appear to show that the "piler-webui[2781]: sphinx query:" is being truncated where a user has a large number of email addresses.

i.e.

piler-webui[2781]: sphinx query: 'SELECT id FROM main1,dailydelta1,delta1 WHERE MATCH('( @to GARYBXDOMAINXCOOP ) & (@from alloptionalXdomainXcoop| salesteamXdomainXcoop......postmast

A successful query appears in the logs with the correct ending: piler-webui[2781]: sphinx query: 'SELECT id FROM main1,dailydelta1,delta1 WHERE MATCH(........ podXdomainXcoop) ') ORDER BY sent DESC LIMIT 0,1000 OPTION max_matches=1000' in 0.28 s, 1000 hits, 5857 total found

Is there any way to allow longer sphinx queries?

I've gone for "major" bug as it is a problem for us. Feel free to reassign priority as you see fit.

Many Thanks Pod Andrews

Comments (6)

  1. Pod Andrews reporter

    Ok, So after enabling query logging for sphinx in /etc/sphinxsearch/sphinx.conf, I found there was an error for the query.. "...ORDER BY sent` DESC LIMIT 0,1000; # error=index dailydelta1,delta1,main1: query too complex, not enough stack (thread_stack_size=244K or higher required)"

    I then adjusted the thread_stack in /etc/sphinxsearch/sphinx.conf ... searchd { ... thread_stack = 512K ... }

    Restarted searchd and the user was able to search and get results, the query log was error free also.

    Not sure if I needed to increase the stack size by quite that much or if I should go with 256K as that should be "just enough". I need to read up on how the thread_stack size affects sphinx performance.

    Thanks for your assistance. Asking the right question was enough to lead me to the answer ;-)

  2. Janos SUTO repo owner

    Good idea, although the sphinx docs says it's 1M by default.

    Update: it seems that the sphinx docs is not in sync with its sphinx.conf.dist file, because the latter says 64k is the default which explains the issue.

    Anyway I've just increased it to 512k with in the config shipped with piler.

  3. Log in to comment