I don't know what you mean by "pressure was done" but yes line length matters and if you primed with sugar it's possible you could have overcarbed your beer to start with.
Temperature, pressure, line diameter and length all play a role and have to be balanced. If your lines are too short you'll get too much foam. That's why @loopie_beer says start wtih 10 feet. If the pour is too slow trim it a little shorter until you get the speed of pour you want with the amount of head you want.
There are lots of articles around on balancing your system that go into great detail about how to determine line length, like this one, https://www.kegworks.com/blog/determine-right-pressure-for-your-draft-beer-system/
In the end if you put on 10 feet as described above you'll be able to fine tune it.