A variant of a peck of troubles.
a. 1535. [He] told hym that Mr. More was in a pecke of troubles.Archæologia, xxv. 97 (N.E.D.).
1839. Brother Nobs was in a peck of misery.History of Virgil A. Stewart, p. 31 (N.Y.).