I'm working on Drupal 7, with php 5.5.38, and I've been encountering the issue where after about 3 minutes, my session is no longer valid. I tried modifying the $cookie_domain, but it doesn't seem to fix anything. I think I was able to prolong the validity of the session by navigating some tabs on the page. Once I stopped clicking and let it sit for about another minute, then I encountered the log-out issue. That could have possibly just been a fluke.

There is an authentication check within the index.php, and I have it send an entry to my error log. It should do this once upon the page load and redirect the user to the login page. It is in fact finding that the user is no longer authenticated after a few minutes of being logged in, as evidenced by the custom error log entry, but I can't understand what could be causing this.