Fatal error: Too many interfaces

We’re run into another problem running aerospike using the host network on a server running multiple docker containers. We got the fatal error: Too many interfaces

Caused by this code: https://github.com/aerospike/aerospike-server/blob/3.10.0/cf/src/socket.c#L1730

That maximum number of network interfaces the system can have is currently set to 50 by default: https://github.com/aerospike/aerospike-server/blob/3.10.0/cf/src/socket.c#L1494

We hit that limit after spinning up some new containers, so aerospike unexpectedly crashed on us. We bumped the limit up to 256, recompiled aerospike along with removing the paranoid network interface code (New enumerate_inter code in 3.10.0 causes fatal error), and used the resultant rpm. It seems to be working okay.

Not sure how this should be handled in the code, but 50 is probably too low for modern linux systems that aren’t dedicated to a single purpose. I know that isn’t how aerospike is designed to be used, but we don’t have the budget right now for dedicated systems.

It’s pretty easy to hit 50 interfaces using docker. Each docker container gets an interface. Each docker network gets a bridge interface. Just to run the physical host, we have a couple of physical ethernet interfaces bonded and bridged for VM use. So, we hit the limit with only 37 containers running.

BTW, thanks for generating useful errors when things like this happen! It sure saves us a lot of troubleshooting time.