To rack ones wits

from The Collaborative International Dictionary of English v.0.48
Rack \Rack\ (r[a^]k), v. t.
   1. To extend by the application of force; to stretch or
      strain; specifically, to stretch on the rack or wheel; to
      torture by an engine which strains the limbs and pulls the
      joints.
      [1913 Webster]

            He was racked and miserably tormented. --Foxe.
      [1913 Webster]

   2. To torment; to torture; to affect with extreme pain or
      anguish.
      [1913 Webster]

            Vaunting aloud but racked with deep despair.
                                                  --Milton.
      [1913 Webster]

   3. To stretch or strain, in a figurative sense; hence, to
      harass, or oppress by extortion.
      [1913 Webster]

            The landlords there shamefully rack their tenants.
                                                  --Spenser.
      [1913 Webster]

            They [landlords] rack their rents an ace too high.
                                                  --Gascoigne.
      [1913 Webster]

            Grant that I may never rack a Scripture simile
            beyond the true intent thereof.       --Fuller.
      [1913 Webster]

            Try what my credit can in Venice do;
            That shall be racked even to the uttermost. --Shak.
      [1913 Webster]

   4. (Mining) To wash on a rack, as metals or ore.
      [1913 Webster]

   5. (Naut.) To bind together, as two ropes, with cross turns
      of yarn, marline, etc.
      [1913 Webster]

   {To rack one's brains} or {To rack one's brains out} or {To
   rack one's wits}, to exert one's thinking processes to the
      utmost for the purpose of accomplishing something; as, I
      racked my brains out trying to find a way to solve the
      problem.
      [1913 Webster +PJC]

   Syn: To torture; torment; rend; tear.
        [1913 Webster]
    

[email protected]