We don't fully know the answer. But every crew that resides on the International Space Station provides us information that we use to adjust our protocols and that extends that period of time. Let's take a closer look.
The longest contiguous amount of time a human has spent in space is 437 days. That was done by Valeri Polyakov, almost twenty years ago. That was his second flight. His first was 240 days long. Sergei Krikalev, over six flights, has spent 803 days in space.
Space is a harsh environment for humans. We didn't evolve to live there. Systems throughout our body have evolved to function under the stresses of gravity.
Our muscles are constantly working against gravity on Earth. Those muscles have less work to do in space, and so they atrophy. That includes the heart, which shrinks a little, the neck muscles that hold up our heads, and our calves.
Since our bones are not experiencing the loads they experience on the ground, they feel no need to maintain themselves. Bone tissue is absorbed and not rebuilt. This absorbed bone can cause kidney stones. The places where the bone has weakened can easily fracture.
Here's a graphic that shows the rate of bone loss for various parts of the body:
There is evidence that extended periods in space can result in dysregulation of the immune system. While there isn't too much risk of exposure to pathogens, a compromised immune system can result in autoimmune responses and hypersensitivity.
Aside from the deleterious affects of microgravity, a potentially larger threat is radiation.
We take for granted how much our planet protects us from radiation. Out in space, astronauts are exposed to galactic cosmic radiation, solar radiation, solar cosmic particles, and geomagnetically bound radiation. This radiation is so prevalent that when astronauts close their eyes, they often "see" bright flashes, as cosmic rays hit their optic nerves.
Radiation exposure can result in cell death or can cause mutations that result in cancers or epigenetic effects. Some systems are quite sensitive to radiation and their functions can become impaired, such as the immune system and the bone marrow system and the eyes, resulting in cataracts.
We do our best to provide shielding, but paradoxically, shielding can result in more exposure by what is called secondary radiation. When an energetic particle hits the shielding material it can emit gamma rays and energetic neutrons.
NASA takes astronaut radiation exposure very seriously. We monitor the exposure of each crew member and maintain a career tally. When they hit the allowed threshold, they can be prohibited from flying again.
Picture: Cosmonaut Polyakov via Wikimedia Commons
About the author:Robert Frost, engineer/instructor at NASA
This answer has been lightly edited for grammar and clarity.