They may or may not be connected. The pain you have-- is it in the soft tissue, or can you push on it at the base of the ribcage? The spot where the ribs join the sternum is a common area for pain, and a large hernia is not necessarily painful. If you have had the pain for years, it is less likely that you will find a solution. Ironically, small hernias are more dangerous than large ones, as the small ones can entrap bowel or mesentery and 'strangulate' the tissue. With large hernias the bowel is more likely to slide in and out of the 'pocket' without getting stuck.
If the pain can be felt in the rib area, it might respond to anti-inflammatory medication like ibuprofen; if it is instead in the soft tissue, but not felt directly in the area of the 'bulge' when you sit up, I would try to massage the area and stretch the muscles in that part of your abdomen. But to answer your question, a pain that is present for a couple years is becoming more and more likely permanent.
It does appear to be in the soft tissue, and does not seem to be connected to the large hernia. Could this cause irregular bowell movements? The reason I ask is because I have battled with this problem for years as well. I have added fiber to my diet and gone as far as having a colonic( colon hydrotherapy), without significant results.Thank you for your response.