We have 3 instances of redis running on a test server. For some reason, our start script which starts redis can write the wrong pid to a file. Here is what it's doing:
su redis -c "redis-server /redis.conf & echo \$! > /var/run/redis_6379"
If I chain together redis_6379 start && redis_6380 start && redis_6381 start
and then I stop them like that and start them like that, after 10 or 15 iterations I'll encounter a pid in the start file that is off by 1.
Does anyone know why that may occur?