Some people feel fine in 2-4 weeks, others have pain for months. It all depends on what type of hernia
it was, how large it was, how it was repaired, etc. Sometimes the mesh can cause pain because it causes (intentionally) an intense scarring
reaction. You can take anti-inflammatory meds to help. It should get better with time.