There could be a number of things wrong anything from constipation to simply eating too much to dropsy.
Since it's been going on for so long I would rule out constipation. If there was a blockage that serious I don't think the fish would still be alive.
How does the poop look?
I'm thinking either a parasite, worms, or dropsy. Another member will have to chime in. I've never dealt with something like this before so I am unsure of how to properly diagnose and treat. I don't want to give out the wrong info.
Sent from my iPhone using Aquarium Advice