Arsenal outplayed for long periods by Bayern before salvaging last-gasp 1-1 draw and then winning 3-2 on penalties.
Wenger worried as Arsenal ravaged by food poisoning before win over Bayern Munich
Arsenal were ravaged by food poisoning in Shanghai that ruled several key players out of their pre-season friendly with Bayern Munich on Wednesday, manager Arsene Wenger said.
Wenger's ailing men were outplayed for long periods by Bayern before salvaging a last-gasp 1-1 draw and then winning 3-2 on penalties.
But the Frenchman said that the sickness that had swept the Arsenal camp, coupled with the severe heat in China and long flights, made for far-from-ideal preparations for another taxing campaign.
Wenger was shorn of Olivier Giroud because of food poisoning, then captain Per Mertesacker pulled out of the game just moments before kick-off because he too fell ill with the same problem.
New signing Sead Kolasinac had to come off before the break, while substitutes Aaron Ramsey and Theo Walcott both also felt unwell.
Pictures from the game
Arsenal were particularly poor in the first half in the 36 degrees Celsius heat and Wenger conceded that the extreme conditions in Shanghai were "a shock" after flying in from Australia, which is in its winter.
"We worked very hard on Monday and Tuesday so I was a bit scared that tonight we could have big problems and in fact in the first half we suffered a bit," said Wenger, under pressure to get Arsenal back in the Uefa Champions League this season.
"Ramsey finished the game [feeling] bad and Walcott, Kolasinac, Mertesacker, Giroud, they all had a little food poisoning."
Wenger said the Premier League club - who next travel to Beijing to face Chelsea on Saturday - did not know what caused the food poisoning.
Wenger added of the punishing pre-season schedule that many top European clubs now undertake to far-flung destinations for commercial reasons: "If you ask me is it ideal physically to prepare? I'd say certainly not.
"Has it got other advantages? Yes because we can meet fans all over the world so that is very positive and the team bonding is easier as well because we live together for two weeks."
Richard Jolly: Klopp has more attacking options ahead of new season
Reserve goalkeeper Emiliano Martinez was the unlikely hero for Wenger and Arsenal, saving Juan Bernat's soft spot kick after Gunners substitute Alex Iwobi nodded in the leveller right at the end of normal time.
Robert Lewandowski had needed just nine minutes to fire German champions Bayern ahead from the penalty spot as they swept through Arsenal, before Iwobi's late intervention meant the game went straight to penalties.
Both sides fielded a mixture of first-team regulars and reserves, with new Bayern signing James Rodriguez and new Arsenal striker Alexandre Lacazette starting.
Wenger's team were thrashed 10-2 on aggregate by Bayern last season in the Champions League and the manager said his players were still hurting.
"I don't think this kind of game wipes out what happened last season," the Arsenal manager said. "We will always remember that. We had a nightmare last season in the second half.
"But it's still good to win against a team like Bayern."
Bayern play AC Milan in Shenzhen, southern China, in their next warm-up game on Saturday.