Hi there!
I tried quite a while to get a running and reliable setup, but apparently I’m missing something.
I try to setup manticorewith plain tables we used an older version of sphinxsearch before but want to upgrade to manticore.
I’ve managed to create a working setup but it fails with the large tables we actually have.
The Setup:
I use the manticore:6.3.0 Image and build upon it to use a custom CMD script in which the manticore.conf gets generated with specific parameters for mariadb connection and for which tables to include, if the main tables are not present in the /var/lib/manticore folder already the indexer gets executed and finally searchd gets started as this"searchd -c /etc/manticoresearch/manticore.conf --nodetach --logdebugv"
This docker container works with smaller data sizes in a local docker compose environment. The user executing the indexing (we use a main+delta schema) is the manticore user as well as the one executing the searchd process.
For the kubernetes setup I use a statefulset and excluded the /var/lib/manticore/ folder as a volume to persist the data, should the container crash.
For the Indexer I created Kubernetes Cronjobs, and from those pods I kubectl exec to the running pods to execute the indexers. I have main indexer running once everyday and delta indexer running every few minutes.
The failure behavior I currently notice is, that the inital deployment works fine and everytime. So starting up the Container, in which firstly the indexer gets executed without a running searchd process and afterwards the searchd process gets started.
But the subsequent times I try to execute any Indexer I get errors like the following, but not really consistenly:
DEBUG: will rotate GENERIC_TABLENAME1
double free or corruption (out)
DEBUG: TaskRotation starts with 11 deferred tables
DEBUG: seamless rotate local table GENERIC_TABLENAME2
rotating table GENERIC_TABLENAME2: started
Crash!!! Handling signal 6
DEBUG: prealloc enough RAM and lock new table
…
DEBUG: all went fine; swap them
…
rotating table ‘GENERIC_TABLENAME2’: success
…
rotating table ‘GENERIC_TABLENAME3’: started
DEBUG: prealloc enough RAM and lock new table
mmalloc(): unaligned tcache chunk detected
I can’t really pinpoint this to any specific reason. The main Indexer process takes up to 30 gib of memory while executing, but the memory limit I have is far greater than that. Also the volume has enough space for the data i’m trying to save.
My manticore.conf has the following settings for searchd:
listen = 0.0.0.0:9313:sphinx
listen = 0.0.0.0:9306:mysql
listen = 0.0.0.0:9308:http
log = /var/lib/manticore/searchd.log
network_timeout = 5
pid_file = /var/run/manticore/searchd.pid
seamless_rotate = 1
preopen_tables = 0
secondary_indexes = 0
unlink_old = 1
threads = 4
net_workers = 4
binlog_path = # disable logging
My Indexer the following:
mem_limit = 1024M
lemmatizer_cache = 256M
write_buffer = 256M
I have the feeling the issue comes up after the sighup from the indexer process to the searchd process, but can’t find any root cause, why