Memory leaking with long running processes

You could store the rules in ETS. That would remove the possibility of leaks in the first place, and remove the GenServer bottleneck.