Yep, I have this issue with my older pair. I actually have not had him hold to term yet, although he got close once. I have two pairs and one has only had one failed batch, which is actually probably my fault because I went to bed isntead of waiting for release.
Background:
Successful pair: around 3 years old and were experienced when I got them carrying successfully, but with low count at release
Failing pair: around 5 years old, was told had mated, but fry were never raised and they had not carried in at least a year.
Both pairs get the same feeding regiment.
What I am finding (and testing right now, as both pairs are carrying), is my older pair seems too entised with food. During eating this pair tends to strike food much more aggressively than the other pair. He usually swallows in less than a week, in, but the one time he almost carried to term (at 20 days roughly)...the fry were hatching/hatched in his mouth. Then they were gone. What I noticed during this event was he just could not resist eating....I know factually he was carrying, as I was just observing the fry moving in his mouth, and I fed the tank for the female, and he just could not resist the food. That was it, he took a huge bite of the food. I know I am anthropomorphising, but i swear he had a look like, o sh** after he took a huge bite. Next batch, he failed to carry with in the normal time frame.
They then took a pause for about 2 months, and now I have the ones he is holding now. So this time around I removed him from the females tank after one day and he is in his own tank now where the fry will be raised. We will see if food proves to be the issue.
I am sure that improper nutrition of the female could cause bad egg batchs that would be discarded too.
My assumptions is that diet is correct on my pairs, but stimulus (food) is what is causing him to fail. He is only at day 5 now, but so far he is calm and all is good.