服务器:centos 16G内存 8核CPU solr6.6 mysql5.6
问题:每次导入数据都是导到10W+条后就卡死
尝试:换过更高配置的服务器 centos 32G内存 24核CPU solr6.6 mysql5.6(然并卵)
最终得出结论,肯定是这丫的配置有问题;
各种百度都是一些基础的,就没有那种几千万数据的实践的,最终不得已,只得自己各种参数各种观察,发现原来是问题出现在commit的上面
修改solrconfig.xml
修改后如下
<autoCommit>
<!--表示软提交达到1万条的时候会自动进行一次硬提交-->
<maxDocs>10000</maxDocs>
<!--设置硬提交 单位 毫秒 (写入硬盘)-->
<maxTime>5000</maxTime>
<openSearcher>false</openSearcher>
</autoCommit>
<!-- softAutoCommit is like autoCommit except it causes a
'soft' commit which only ensures that changes are visible
but does not ensure that data is synced to disk. This is
faster and more near-realtime friendly than a hard commit.
-->
<!--设置软提交 单位 毫秒 (写入内存 )-->
<autoSoftCommit>
<maxTime>10000</maxTime>
</autoSoftCommit>