Around 2 a.m. one recent Saturday, Julia Masli laughed as she glided up to an audience member in a sweaty basement room at Edinburgh’s Monkey Barrel comedy club.Wearing a ghostly outfit with dolls’ legs sticking from a black hat, she pointed a microphone at the panicked-looking man and asked a simple question: “Problem?”After a confused “Er,” he blurted out a genuine issue for most people in the basement. “I’m quite warm,” he said.Masli, looking concerned, led the man onstage and made him sit on a stool. Then she pulled a huge electric fan from a nearby cupboard and duct-taped him to it.As the audience laughed, the clown was already moving on. “Problem?” she said, pointing the microphone at another audience member.Masli, right, had planned for “Ha ha ha ha ha ha ha” to run only two weeks.Robert Ormerod for The New York TimesMasli’s show “Ha ha ha ha ha ha ha” (running through Aug. 27) has become the surprise hit of this year’s Edinburgh Fringe, Britain’s largest arts and comedy festival. She considered it a work in progress and had planned for only two weeks of performances, but word-of-mouth enthusiasm and rave newspaper reviews quickly sold out the run, forcing Masli to extend it in the only available time slot: 1:30 a.m.On Wednesday, the show was nominated for the fringe’s main comedy award, and Masli announced a three-week London run next year.Viggo Venn, another clown and Masli’s partner, said the show had gripped audiences because “it feels so risky and exciting,” with little possibility of planning. “She just has to trust the comedy gods that something magical will happen,” Venn said. “And it does. Every day.”In one recent show, Venn recalled, a man said he had a strained relationship with his mother, so Masli called her at 2 a.m., leading to an emotional chat onstage. That wasn’t something you get from many comedy acts, Venn said.During a recent interview in an Edinburgh pub, Masli, 27, said she developed shows by coming up with games to play, “and then from those I find where the meat is.” Last year, she started a routine where she’d walk up to audience members and say “Ha” in increasingly silly ways, seeing how they responded. If they echoed her, she tinkled a bell. If they misplaced the phrasing, she screamed.Saying “Problem?”, Masli found, quickly made audience members share startling tales.Robert Ormerod for The New York TimesOne night, she decided instead to say “Problem?” and see what happened. She found that audience members quickly shared startling tales. Working with Kim Noble, a performance artist, she said they realized: “This is it. The ‘Problem?’ is the show.”Performing “Ha ha ha ha ha ha ha” has changed Masli’s own perspective on the world, she said. At an early show, a man said he was overweight, so she began running around the venue with him to help him burn calories. “It was wild,” she recalled.But when another man said he too felt fat, she said, she concluded the problem lay not with the men, but with how society saw them. She asked other audience members if they felt the man looked overweight, then kicked out anyone who agreed.“Clown is really about connection,” Masli said in the interview when asked why she thought the show was a success. “Maybe right now everyone just wants to be connected.”The daughter of two lawyers, Masli grew up in Tallinn, Estonia, until age 12 when her parents sent her to a girls’ boarding school in England. Masli has said she spoke so little English at the time that she would mime to be understood.As a teenager, her heart was set on becoming an actor and performing the great tragedies on London stages. She auditioned for British drama schools, she said, “but got nowhere because I had this really strong accent.” So she moved to Étampes, France, to study under Philippe Gaulier, a clowning instructor whose past students include Sacha Baron Cohen.Masli uses a microphone taped to a golden mannequin leg as a reminder of her first Fringe show.Robert Ormerod for The New York TimesFor nine weeks of a 10-week module, Masli said, she failed to make anyone laugh. In the final week, Gaulier told her to perform as a plumber. She came onstage, looked at the pipes and said, “Oh, God.” When everyone fell about, she couldn’t stop thinking about how to make it happen again.Venn, Masli’s partner, said there was something in Masli’s eyes — “this innocent but cheeky look” — that could make anyone laugh with a glance.After returning to London, Masli struggled to make it as a clown. At one point, she stopped performing for 18 months and became so depressed she couldn’t get out of bed. Things only changed in 2019, she said, when she took her first show, “Legs,” to the Fringe. Made with the Duncan Brothers, two other clowns, it featured skits such as Masli shaking hands with audience members using her feet.Only two people saw the first performance, Masli recalled, but the show won a prize for comic innovation. Masli now tries to highlight the appendage in all her shows. “‘Legs’ saved me,” she said. “It was the biggest ‘Keep going.’” Last year, she returned to Edinburgh with “Choosh!” a solo show about a migrant struggling to make it in the United States, for which The Daily Telegraph named her the Fringe’s “best sad clown.”Masli onstage. On Wednesday, her show was named as one of eight nominees for the Fringe’s main comedy award.Robert Ormerod for The New York TimesBoth those shows featured some audience interaction, but nothing compared to what happens in “Ha ha ha ha ha ha ha.” During the recent Saturday performance, the problems ranged from the trivial (someone’s glasses were broken) to the seemingly insurmountable (a man said he was a hypochondriac). Masli tried to solve them all.She only seemed stumped once, when an audience member said that she was devastated after splitting up with her girlfriend. Masli empathized, but that didn’t seem to help. She solicited relationship advice from other audience members. That didn’t work, either. So Masli suggested something a little more left field: that the person crowd surf.Approaching 2:30 in the morning, the audience member leaped into the crowd, who then carried her from the front of the room to the back. Her heartbreak was far from solved, but for a minute, at least, she seemed to forget all about it. More