0

I have problem with sphinx indexer and large (over 1gb database). Seems that its running out of space and I am unable to change the /tmp folder it is using. Googling the error gives lot of mysql related errors, but I have changed all paths in /etc/mysql/* files to /var/tmp which has more available space. Current /tmp folder has 1,4 GB of space and that does not seem to be enough. So is there a way to change what folder /sphinx/bin/indexer is using for temp files or some other ways to go around this? (It is still possible that it is mysql related, machine has several mysql sockets, thou I tried to change tmp for them all and restarted)

Terminal output:

$ /usr/local/sphinx/bin/indexer --all
Sphinx 2.0.6-release (r3473)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file './sphinx.conf'...
indexing index 'Company'...
collected 371124 docs, 20.2 MB
collected 772228 attr values
sorted 0.8 Mvalues, 100.0% done
sorted 20.4 Mhits, 100.0% done
total 371124 docs, 20237855 bytes
total 16.348 sec, 1237872 bytes/sec, 22700.24 docs/sec
indexing index 'PhoneNumbers2'...
WARNING: Attribute count is 0: switching to none docinfo
ERROR: index 'PhoneNumbers2': Error writing file '/tmp/MYbP6cIt' (Errcode: 28).
total 4058019 docs, 83846995 bytes
total 45.524 sec, 1841793 bytes/sec, 89138.94 docs/sec
total 1885604 reads, 0.779 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 76 writes, 0.392 sec, 3223.9 kb/call avg, 5.1 msec/call avg    
Synomi
  • 47
  • 1
  • 8
  • From errno.h: `#define ENOSPC 28 /* No space left on device */` – wildplasser Jan 23 '13 at 10:14
  • Solved.. reason for error was that something was wrong with SQL statements, which may have caused huge file etc.. Anyway using different SQL statements for the database solved the issue. – Synomi Jan 23 '13 at 11:30
  • Just to be clear that 'error' is coming from mysql. Its not sphinx. so yes would be an issue with mysql side of things. – barryhunter Jan 23 '13 at 12:28

1 Answers1

0

I am not exactly sure how to change the tmp folder but what you can do is slice the indexing query using range so that it will fit into it. Check out sql_query_range together with sql_range_step

Also checkout the following blog entry

http://sphinxsearch.com/blog/2012/08/14/indexing-tips-tricks/

Josnidhin
  • 12,469
  • 9
  • 42
  • 61
  • Thx, got those queries working, but did not help with the issue, anyway solved now, something was wrong with the SQL statements used in sphinx config (not done by me). Found more recent sphinx.conf which had updated sql and worked. – Synomi Jan 23 '13 at 11:33