In this season of defeat after defeat interspersed with the occasional win, Astros manager Bo Porter was reduced Sunday to complimenting a veteran’s comeback effort and hoping a young pitcher can discover the fine line that prevents bad innings from getting worse.

Astros pitchers Jordan Lyles and Edgar Gonzalez were the subjects in question during a 12-7 Mother’s Day loss to the Texas Rangers before 19,730 at Minute Maid Park. The Rangers shelled Lyles (1-1) for 11 hits and eight runs in four innings and got to Gonzalez, who arrived in Houston late Saturday night and Sunday morning was added to the roster spot vacated by Philip Humber, for four runs in the fifth, followed by three shutout innings

Three innings — the third through the fifth — accounted for all 12 runs and 13 of 17 hits for the Rangers, who hit three homers for the third game in a row.

It’s just another teaching point for Porter, whose team wrapped up a 2-7 homestand with its third straight loss to the Rangers and Monday begins a three-day road series with Detroit, which outscored the Astros 37-8 in a four-game sweep this month.

“When you step on a baseball field and it’s competition, you learn not only from your own experiences, but if you’re locked into the game, you can learn a lot from your opponent,” Porter said. “Look at the Rangers … when they get big hits, the majority of the time it’s up the middle, the other way; they grind their at-bats out, their pitchers attack. It’s playing winning baseball.”

The Astros were a far piece from winning baseball Sunday. Before they scored six runs in the final two innings, paced by Chris Carter’s three-run homer in the eighth and Brandon Barnes’ two-run shot in the ninth, they were outscored 12-1 and outhit 17-4.