It's hard to remember names. Despite your best efforts, strategies, and even apps, you're going to forget. Gretchen Rubin, writing for Psychology Today, has a good suggestion for avoiding the awkwardness that follows your lack of memory: use a compliment. For example:

Accurately remembering names is one of the simplest yet most important components of interacting…
Read more Read more

"Wow, you have a terrific memory. I can't believe you remember my name from that meeting six months ago. I can't remember the names of people I met yesterday! So of course I have to ask you your name."

When you simply can't remember a name it's not a bad idea to be a little apologetic and complementary. As with the example, it helps to show you remember something so it's clear you at least recall, to some extent, who you're talking to. In many cases people will care more that you actually remembered something about them rather than their name, especially if that moment had a particular impact. When I meet new people, I apologize for forgetting their names in advance. It's extremely likely that I will, so I let them know ahead of time and ask them to just slip it into the conversation whenever possible because I want to remember them. A little bit of flattery can make your deficiencies much less of a problem.