I think I've fixed the problem. The first/biggest problem was no errors from Valgrind. I had some code using a DB connection with a global, but this wasn't used by any threads I created so I didn't think it was a big deal. I fixed that and some other issues.
Then Valgrind started showing errors and I've fixed those. Now my program seems stable again, but I continue to test. I'm actually not yet using the new channels, I'd rather only do that if I have to. But thanks for the advice.
