Mount Merapi spews volcanic material as authorities warn the volcano could erupt at any time. ((Associated Press))

Frightened residents abandoned their homes in a bustling city of 400,000 at the foot of Indonesia's rumbling volcano Monday, cramming onto trains, buses and rented vehicles as authorities warned Mount Merapi could erupt again at any time.

A mass burial late Sunday for many of the 141 people killed in the last two weeks was a reminder of the mountain's devastating power that culminated in its deadliest blast in 80 years, sending hot clouds of gas, rocks and debris avalanching down its slopes.

With the closest airport closed by ash, rail traffic leaving Yogyakarta has doubled in recent days, as residents — many of them students from the city's universities — tried desperately to get out.

"My parents have been calling ... saying 'You have to get out of there! You have to come home!"' said Linda Ervana, a 21-year-old history student who was waiting with friends at a train station.

After days of failing to get tickets — long lines stretch all the way through the main hall — they decided to rent a minibus with other classmates.

"It feels like that movie 2012," said her 22-year-old friend, Paulina Setin. "Like a disaster in a movie."

Concerns about airborne ash after Friday's massive eruption prompted many international airlines to cancel flights to the capital, Jakarta, just days before President Barack Obama's planned trip to Indonesia — his second stop in a 10-day Asian tour.

All were flying again Monday, and White House officials said Obama was still scheduled to arrive Tuesday.

One of the world's most active volcanoes, Merapi has erupted many times in the last century, killing more than 1,400. But Friday was the mountain's deadliest day since 1930, with nearly 100 lives lost.

Islam mandates that the dead be buried quickly, so authorities gave relatives three days to identify their loved ones. To speed up the process, most families chose to have their relatives interred in a mass grave — a common practice in Indonesia following a disaster.

One by one the bodies — some too charred to be identified — were lowered into a massive trench in the shadow of the volcano.

'It could erupt again any time'

Merapi was still issuing explosive roars Monday as it shot clouds of gas and debris up to one kilometre in the air as ash and pyroclastic flows poured down its slopes.

"Based on what we're seeing now, it could erupt again any time," said Surono, a state volcanologist.

The National Disaster Management Agency said the overall death toll from the volcano climbed from 138 to 141 on Monday after search and rescue teams found more bodies on the mountain.

The Indonesian government has put Yogyakarta, 30 kilometres away, on high alert.

The city's airport was closed yet again on Monday and the ash hung so thickly in the air that breathing became painful and clothes stunk of smoke after any time outdoors.

Though there have been no orders to evacuate Yogyakarta, many residents have decided to go on their own. Small hamlets on the edge of the city looked like ghost towns, houses shuttered, some with laundry still hanging outside.

The biggest threat to the city, experts say, is not searing gas clouds, but the Code River, which flows right into the city's heart from the 3,000-metre mountain.

It could act as a conduit for deadly volcanic mudflows that form in heavy rains, racing at speeds of up to 100 km/h and destroying everything in their path. A thick, black volcanic sludge has already inundated one city neighborhood that starts at the river bank and climbs a hillside.