Sulfasalazine has helped me the most, whereas I got no relief from Asacol, of which Lialda is a reformulation, if I'm not mistaken.
As a previous poster has mentioned, six grams a day is a lot of sulfasalazine. I take four grams, and my GI thinks that probably too high for a long time (and indeed it seems to be effecting my hearing). As was also mentioned, stopping and "rechallenging" with sulfasalzine oftens eliminates the headaches. It is said, that starting with a low dose and increasing it over time will help with side effects.
(The sulfasalzine has also almost completely eliminated the joint pain I've had for probably close to twenty years.)