The last few patches I've been relying on bedlogging instead of logging out at a station.
I've found it more reliable to not have to worry about retrieving my ship. Plus I can jump right into the action a lot sooner.
It's hard to say "how long" because there can be times where I don't log in all week, but I'd say my ship lasted at least 4-5 gaming sessions (if not more).
Star Citizen
Seems Dangerous as bed Logging isn't working reliably and is an easy way to get the infinite loading screen. The good news is that it's typically the fixable infinite loading screen by taking the ship you bed logged in into Arena Commander.
Strange, the last time I had an infinity loading bug with bedlogging was in a Valkyrie in 3.17.x (can't remember which patch patch)
But alas good that there is a workaround for this :)
Before I got perma errored on May 19th, I was bed logging regularly, and getting the bugged login about once out of every 4-5 bed logs. Then I log out in Lorville (not bed logging) and I'm perma borked. Haven't been able to login in since.
Oh damn, sorry to hear that. Hope 3.19.1 will fix that issue for you :/
The longest its ever lasted for me was about 4 days before getting invalid location id, and that was under ideal circumstances in deep space not in a planet or L points object container