How to ask this to a guy?

Is it okay to ask a guy how long did his longest relationship last? (No other details just the duration coz I'm curious and i want to feel secure in this relationship not like he would break up any day)?

If okay, how do I ask this in the most gentlest and indirect manner?
How to ask this to a guy?
Post Opinion