I'm running Sphinx Search Server V2.06 ( the latest stable release ) on an Amazon EC2 with Linux CentOS. In general it is running fine, but the searchd.log is showing this error over and over with varying number of repeat times:
send() failed: 32: Broken pipe WARNING: last message repeated 6 times
I assume this is some sort of lost connection ( based on some Sphinx forum responses ). I'd like to fix this, but it's not our primary concern ... but possibly related. After Sphinx has been running for a while, or under heavy load ( as near as I can tell ), the number of times the 'message repeats' goes up and peaks at 100. Generally around the same time the following fatal error will occur and it will shut Sphinx down:
FATAL: accept() failed: Too many open files
I've looked into upping the file limits on my system but am not sure what exactly to do. Here is what my system currently reports. I am still seeing this error.
sysctl fs.file-max ... returns ... fs.file-max = 7017952 ulimit -a ... returns ... open files 1024 ulimit -Hn ... returns ... 4096 ulimit -Sn ... returns ... 1024
I don't really know what these different numbers mean, but I think they could be used to solve my problem according to this article. How can I fix the sphinx Fatal error and make sure that the system maintains this 'fixed' configuration after a reboot?