Wiktionary
rack one's brain
vb. (context idiomatic English) To struggle to think of or remember something.