Feuding over raises on “The Big Bang Theory” has led to a BIG win for show star Jim Parsons – he got his $1 million-an-episode asking fee and is tying the knot with boyfriend Todd Spiewak!

Parsons, 41, who plays brilliant but socially-inept physicist Sheldon Cooper on TV’s top-rated comedy series, joined co-stars Johnny Galecki and Kaley Cuoco in walking out of production on July 30 as they sought a pay hike from $325,000 to a whopping $1 million an episode.

While the actors eventually got their raise – and three-year contract extensions to boot – the week’s work stoppage left Jim with unexpected time on his hands.

That led to a heart-toheart with Todd, the 37-year-old art director who has been his partner for nearly 12 years.

“The labor dispute had Jim really assessing where he was going with his life,” a friend told The ENQUIRER. “Todd has wanted to get married for a long time now, and he told Jim he felt like they were just treading water in their relationship. Jim has kept telling him he wanted to make sure he was settled and secure before he took on such a major change, but Todd shot back, “You’re going to be making more than $20 million a year now, how set do you need to be?”

Jim, who first revealed he’s gay in a 2012 newspaper interview, had confessed in the past to a serious case of cold feet about marriage.

“Jim is a lot like his character Sheldon,” the friend said. “He likes life how it is now and is scared of change.

But he finally told Todd, ‘The thought of losing you is scarier than anything I can imagine,’ and he and he asked Todd to marry him!”