I've run into similar problems. The one for sure that I corrected did not have adequate fall on the sewer/drain line. Once the drain filled the toilet quit working until it finally drained out slowly. I simply dropped the other end of the offending part of the drain and it worked fine. Your problem/solution may be different.