V
V
Vladimir Shishmintsev2016-03-08 12:31:23
PHP
Vladimir Shishmintsev, 2016-03-08 12:31:23

Why is the connection to Sphinx dropping?

Good afternoon.
The connection to the sphinx periodically drops:

MySQL server has gone away

and the sphinx itself works, the logs are empty, the load is zero.
Sphinx config is:
indexer
{
  mem_limit				= 2048M
  lemmatizer_cache		= 1024M
}

common
{
  lemmatizer_base			= /etc/sphinx/dicts
}

searchd
{
  listen					= 9312
  listen					= 127.0.0.1:9306:mysql41
  pid_file 				= /var/run/sphinx/searchd.pid

  binlog_path				= /var/lib/sphinx
  binlog_flush			= 2
  binlog_max_log_size		= 512M
  log						= /var/log/sphinx/searchd.log
  query_log				= /var/log/sphinx/query.log
  rt_flush_period			= 300

  read_timeout			= 5
  max_children			= 200
  client_timeout			= 300
  seamless_rotate			= 1
  preopen_indexes			= 1
  unlink_old				= 1
  workers					= threads

  max_filters				= 256
  max_packet_size			= 8M
  mva_updates_pool		= 1M
  max_filter_values		= 4096
  max_batch_queries		= 32

  collation_server		= utf8_general_ci
  collation_libc_locale	= ru_RU.UTF-8
}


index testingIndex
{
  type				= rt
  path				= /var/lib/sphinx/testing
  rt_mem_limit		= 1024M

  rt_attr_uint		= table_id
  rt_attr_string		= table_name
  rt_attr_string		= is_status
  rt_field			= name

  mlock 				= 0
  dict				= keywords
  docinfo				= extern
  html_strip			= 1
  min_prefix_len		= 1
  expand_keywords		= 1
  index_exact_words	= 1
  morphology			= lemmatize_ru_all
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pyatnitsin, 2016-03-10
@jafte

Perhaps this topic will help: sphinxsearch.com/forum/view.html?id=12957
In short, it is possible that the connection will be lost while Sphinx is manipulating the index.
The solutions proposed in the topic:
1. open connections with Sphinx as needed, take your own and close it.
2. check the connection time, if it is older than 5 seconds, for example, then close-open it again.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question