It was supposed to be the bigger, better party. Electric Zoo 2013 was the fifth annual Labor Day weekend of electronic dance music on Randalls Island, and its promoter, Made Event, had expanded it by adding another stage with additional headliners. But after two concertgoers died, apparently from using MDMA (known in different formulations as Molly or Ecstasy), Made Event followed the recommendation of the mayor’s office and abruptly canceled Sunday, the third day of the festival. Last week, the House of Blues in Boston closed temporarily after drug overdoses following a show by Zedd, who would have been one of Sunday’s Electric Zoo headliners.

The tone of the festival had already changed on Saturday. My shoulder bag was searched far more thoroughly on the way in than on Friday, and through the day, Made Events representatives made sober announcements onstage urging people to rest, hydrate, get help for anyone in trouble and not to overdo alcohol and drugs — the last of which drew some laughs. MDMA, though it’s dangerous in excess like any drug, has long been associated with dance music; it makes people happy, energetic and affectionate, and since getting the innocuous name Molly it has been turning up in lyrics — which D.J.’s often sample and add into mixes.

Last year, at the Ultra Music Festival, introducing the D.J.-producer Avicii (who headlined Electric Zoo on Friday), Madonna — whose 2012 album was called “MDNA” — asked the audience, “How many people in this crowd have seen Molly?” (She later insisted it wasn’t a drug reference.) At Electric Zoo the word was all over T-shirts; one group of five people had coordinated bright yellow ones with a single letter on each: M, O, L, L, Y. It’s part of the dance-music landscape — unremarkable, until people die.