As he was training in 2004 for his second space flight to help in the construction of the International Space Station, a routine visit to the doctor almost cut short Dave Williams' career as an astronaut.
Williams, a physician himself, had gone for his annual checkup to maintain his flight status as an astronaut and pilot when a blood test revealed he had prostate cancer.
He was three years away from the planned 2007 space station mission, but suddenly everything was on hold.
Williams titles his new memoir, 'Defying Limits - Lessons from the Edge of the Universe', but the book reveals it was back on Earth that he faced some of his greatest challenges.
"I sort of forgot that I was a doctor when I heard the news. All of a sudden I had the feeling that 'Oh, my goodness, I've got cancer, I'm going to die'," Williams, 64, told The Canadian Press.
"Fortunately, the rational part of me sort of kicked in, and I started to approach this as I would if I was another patient — even though the patient was myself."
NASA found a surgeon for Williams at Memorial Sloan Kettering Cancer Center in New York City, and he had his prostate removed in August 2004.
While performing the procedure, doctors discovered the tumour had spread, but they were able to get it all. Williams was given the green light to continue training for his space voyage.
The cancer scare came the year after another trauma for Williams. In February 2003, the U.S. space shuttle Columbia broke up while returning to Earth, killing seven astronauts — all close friends of Williams.
He took part in recovery efforts searching for debris, and recounting that chapter of his life was tough.
"I'd write a couple of paragraphs and then I'd quite literally have to take a break and go do something else and come back to continue writing," he said. "It was a very sad time for us in the program."
During his 2007 space station visit, Williams helped installed a truss on the orbiting laboratory and performed a Canadian record of three spacewalks.
It was during his second sortie, perched on the Canadarm, that he gazed down at Earth awestruck. He realized he was "looking at this incredible four-and-a-half-billion-year-old planet upon which the entire history of the human species had taken place," he said in the interview.
His first space mission was on board the shuttle Columbia in April, 1998 — the same orbiter that blew up five years later. During the 16-day flight, while serving as a mission specialist, Williams carried out neuroscience experiments that focused on the effects of microgravity on the brain and nervous system.
Born in Saskatoon, Williams grew up in Montreal. His dream of becoming an astronaut began just before his seventh birthday when he watched on a black-and-white TV as astronaut Alan Shepard took a sub-orbital flight in May 1961, becoming the first American in space.
His book recounts setbacks large and small that he experienced as he pursued his dream. In Grade 5, while living in suburban Montreal, he was struck by a car on his bike while headed to school but escaped without serious injury. Later as a teenager in the Royal Canadian Army cadets, he was thrown from a military truck when it overturned, but he managed to walk away with some scrapes and aches.
A more sobering moment came during the Canadian Space Agency's astronaut selection process in 1992, when an eye exam revealed Williams had a degenerative condition of the retina. The degeneration turned out to be mild, and the Canadian Space Agency selected Williams and three others to join the astronaut corps.
Williams met his wife Cathy, who went on to become an airline pilot, at a swimming pool in a Montreal suburb in 1978.
He recounts how despite his busy schedule, he tried to stay in touch, even at the most improbable moments. During his first space trip, Williams sent a message directly to his wife's Air Canada cockpit while she was co-piloting a flight between Montreal and Toronto.
"We are having a great time orbiting the Earth at Mach 25 much higher than flight levels," it read. "Please extend best wishes ... to the captain, the crew and all passengers."
The captain flicked on the plane's PA system and read the message to the entire plane, prompting a round of applause.
Williams has a daughter Olivia and a son Evan as well as a nephew Theo, who came to live with the family after losing both of his parents to cancer. Evan was diagnosed with Down syndrome when he was born in 1994, but for the Canadian astronaut it was just another personal challenge.
"Life is full of adversity, and I don't think I'm unique in that way," Williams said in the interview.
"I think most people in their lives have had challenges at one point or another, and I think it is how we respond to those challenges that, in part, brings meaning to our life."
The book, which was released Oct. 30, is published by Simon and Schuster Canada.