Constantly being logged out on a mobile device

Why am I constantly logged out? Is it a security setting in my iPhone?