I had a problem earlier where the lcr module would stop rolling over (i.e., next_gw() was not returning the next gateway, even though there *were* valid gateways to return). During debugging and burrowing around, I serendipitously discovered that my 'missed_calls' table did not have the same schema as the acc table (i had added new columns to the acc table, but not to the missed_calls table). Well, I made the schemae of the two tables identical, and that seems to have cleared up the lcr problem - i.e., the the calls roll over perfectly now.
So, do you think there is some kind of connection leak? Maybe when/where it tries to write to the missed_calls table (and fails, repeatedly), it is clobbering something?
Just FYI...