I'm running sphinx on server A with configuration for RT-INDEXING as below:
index orders_rt
{
type = rt
path = /usr/local/sphinx/var/data/orders_rt
rt_mem_limit = 1024M
rt_field = item_name
rt_attr_bigint = order_id
}
From another server B regular INSERT are made in-order to achieve real-time indexing. I make
db connection using anydb-sql with dbconfig as below:
{
url: 'mysql://x.x.x.x:9306',
connections: { min: 30, max: 60 }
};
Now, If I restart searchd on server-A or simply restart server-A, I see the INSERTS fails after 1 or 2 restart. From Sphinxql SHOW STATUS I see the connections are reduced every time I restart searchd.
Can anyone help me here. Please comment If I am not clear enough with the problem.
Using sphinx-2.1.9, node-v0.10.31, mysql 5.6.19
That looks like the mysql client is using peristant connections. Ie connections are held open.
They are not detecting that the server side (sphinx) has restarted.
Need to somehow configure your client to notice a connection has been terminated, so it can reconnect.
Got this issue resolved by releasing db-connections back to mysql-connection-pool after the required query is done.