A
A
Anatoly Gusev2011-10-25 20:07:33
Sphinx
Anatoly Gusev, 2011-10-25 20:07:33

sphinx error.....?

UPD. Problem solved. To everyone who encounters this problem:
1 - Use sphinx 0.9.9
2 - Check the config so that the mem_limit parameter is within acceptable limits (from 32M to 2047M, but 256M was enough for me for a base of a million records)
3 - In the searchd block of the config should be parameter:
ondisk_dict_default = 1
4 - Do not forget about the memory, you need a lot of it (2GB of free minimum, only 4GB was enough for me with 1 million records).
Good evening everyone.
For many days I have been struggling with an error when working with sphinx. On the off forum they did not help, I want to know if anyone here can help.
So, I set up Sphinx with IPB 3, the config looks like this:

indexer<br/>
{<br/>
 mem_limit = 5000M<br/>
}<br/>
searchd<br/>
{<br/>
 listen = 127.0.0.1:9312<br/>
<br/>
log = /var/sphinx/log/searchd.log<br/>
<br/>
query_log = /var/sphinx/log/query.log<br/>
<br/>
read_timeout = 5<br/>
<br/>
client_timeout = 300<br/>
<br/>
max_children = 30<br/>
<br/>
pid_file = /var/sphinx/log/searchd.pid<br/>
<br/>
max_matches = 1000<br/>
<br/>
seamless_rotate = 1<br/>
<br/>
preopen_indexes = 0<br/>
<br/>
unlink_old = 1<br/>
<br/>
ondisk_dict_default = 1<br/>
<br/>
mva_updates_pool = 1M<br/>
<br/>
max_packet_size = 128M<br/>
<br/>
max_filters = 256<br/>
<br/>
max_filter_values = 4096<br/>
}<br/>

If necessary, I can provide the code for the rest of the file. When indexing, at first everything goes well, but at the very end an error appears:
[[email protected] var]$ sudo /usr/local/bin/indexer --config /etc/sphinx/sphinx.conf --all<br/>
Sphinx 0.9.9-release (r2117)<br/>
Copyright © 2001-2009, Andrew Aksyonoff<br/>
<br/>
using config file '/etc/sphinx/sphinx.conf'...<br/>
indexing index 'gallery_search_main'...<br/>
collected 5612 docs, 1.1 MB<br/>
sorted 0.1 Mhits, 100.0% done<br/>
total 5612 docs, 1061951 bytes<br/>
total 0.385 sec, 2752380 bytes/sec, 14545.26 docs/sec<br/>
indexing index 'gallery_search_delta'...<br/>
collected 0 docs, 0.0 MB<br/>
total 0 docs, 0 bytes<br/>
total 0.005 sec, 0 bytes/sec, 0.00 docs/sec<br/>
indexing index 'gallery_search_comments'...<br/>
collected 95 docs, 0.0 MB<br/>
sorted 0.0 Mhits, 100.0% done<br/>
total 95 docs, 10699 bytes<br/>
total 0.012 sec, 875460 bytes/sec, 7773.50 docs/sec<br/>
indexing index 'gallery_search_comments_delta'...<br/>
collected 0 docs, 0.0 MB<br/>
total 0 docs, 0 bytes<br/>
total 0.008 sec, 0 bytes/sec, 0.00 docs/sec<br/>
indexing index 'core_search_main'...<br/>
collected 30 docs, 0.1 MB<br/>
sorted 0.0 Mhits, 100.0% done<br/>
total 30 docs, 79965 bytes<br/>
total 0.015 sec, 5254977 bytes/sec, 1971.47 docs/sec<br/>
indexing index 'core_search_delta'...<br/>
collected 0 docs, 0.0 MB<br/>
total 0 docs, 0 bytes<br/>
total 0.004 sec, 0 bytes/sec, 0.00 docs/sec<br/>
indexing index 'forums_search_posts_main'...<br/>
collected 965770 docs, 640.8 MB<br/>
sorted 39.9 Mhits, 100.0% done<br/>
total 965770 docs, 640754002 bytes<br/>
total 336.202 sec, 1905856 bytes/sec, 2872.58 docs/sec<br/>
indexing index 'forums_search_posts_delta'...<br/>
collected 0 docs, 0.0 MB<br/>
total 0 docs, 0 bytes<br/>
total 0.027 sec, 0 bytes/sec, 0.00 docs/sec<br/>
indexing index 'members_search_main'...<br/>
collected 17334 docs, 0.6 MB<br/>
collected 34668 attr values<br/>
sorted 0.1 Mvalues, 100.0% done<br/>
sorted 0.1 Mhits, 100.0% done<br/>
total 17334 docs, 619859 bytes<br/>
total 3.574 sec, 173428 bytes/sec, 4849.82 docs/sec<br/>
indexing index 'members_search_delta'...<br/>
collected 0 docs, 0.0 MB<br/>
collected 0 attr values<br/>
sorted 0.0 Mvalues, nan% done<br/>
total 0 docs, 0 bytes<br/>
total 0.001 sec, 0 bytes/sec, 0.00 docs/sec<br/>
indexing index 'calendar_search_main'...<br/>
collected 649 docs, 0.4 MB<br/>
collected 1298 attr values<br/>
sorted 0.0 Mvalues, 100.0% done<br/>
sorted 0.0 Mhits, 100.0% done<br/>
total 649 docs, 420252 bytes<br/>
total 0.047 sec, 8817708 bytes/sec, 13617.28 docs/sec<br/>
indexing index 'calendar_search_delta'...<br/>
collected 0 docs, 0.0 MB<br/>
collected 0 attr values<br/>
sorted 0.0 Mvalues, nan% done<br/>
total 0 docs, 0 bytes<br/>
total 0.001 sec, 0 bytes/sec, 0.00 docs/sec<br/>
indexing index 'blog_search_main'...<br/>
collected 345 docs, 1.7 MB<br/>
sorted 0.0 Mhits, 100.0% done<br/>
total 345 docs, 1689228 bytes<br/>
total 0.848 sec, 1989871 bytes/sec, 406.40 docs/sec<br/>
indexing index 'blog_search_delta'...<br/>
collected 0 docs, 0.0 MB<br/>
total 0 docs, 0 bytes<br/>
total 0.001 sec, 0 bytes/sec, 0.00 docs/sec<br/>
indexing index 'blog_comments_main'...<br/>
collected 300 docs, 0.4 MB<br/>
sorted 0.0 Mhits, 100.0% done<br/>
total 300 docs, 351576 bytes<br/>
total 0.016 sec, 21819400 bytes/sec, 18618.50 docs/sec<br/>
indexing index 'blog_comments_delta'...<br/>
collected 300 docs, 0.4 MB<br/>
sorted 0.0 Mhits, 100.0% done<br/>
total 300 docs, 351576 bytes<br/>
total 0.053 sec, 6610435 bytes/sec, 5640.68 docs/sec<br/>
total 16 reads, 4.084 sec, 62958.8 kb/call avg, 255.3 msec/call avg<br/>
total 2093 writes, 22.247 sec, 987.9 kb/call avg, 10.6 msec/call avg<br/>
WARNING: munmap() failed: Invalid argument<br/>

Does anyone have any suggestions as to what it might be?

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
A
Andrey Shaydurov, 2011-10-26
@GearHead

mistake? where is the error? I see one varning. does the search work?

@
@ntkt, 2011-10-26
_

It shouldn't be fatal, look at the sources. Yes, we could not map a piece of memory, because or the address ran away, or length = 0, but life goes on.
src/sphinxstd.h, line 1389:


  /// deallocate storage
  void Reset ()
  {
    if ( !m_pData )
      return;

#if USE_WINDOWS
    delete [] m_pData;
#else
    if ( g_bHeadProcess )
    {
      int iRes = munmap ( m_pData, m_iLength );
      if ( iRes )
        sphWarn ( "munmap() failed: %s", strerror(errno) );
    }
#endif // USE_WINDOWS

    m_pData = NULL;
    m_iLength = 0;
    m_iEntries = 0;
  }

A
Anatoly Gusev, 2011-10-26
@MximuS

That's just the point that search too does not work. Writes No space on devise (length = 1) for all files. The VPS has 42 GB of screws and 1 GB of RAM. Sum of index file sizes 300 MB

V
Vitaly Peretyatko, 2011-10-26
@viperet

try building a different version of Sphinx

A
Anze, 2011-10-27
@Anze

memory limit: default is 32M, max is 2047M, recommended is 256M to
1024

A
Anatoly Gusev, 2011-10-27
@MximuS

All right, the problem is resolved. Thanks to all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question