Users getting kicked out on Shared Hosting NextCloud 12 (can Pay for help)

I am running into the issue outlined on this github issue:

https://github.com/nextcloud/server/issues/5274 . ( I made a comment with screenshots at the bottom)

Right now my best bet is if I switch from AJAX to Cron for background jobs like garbage collection then users should not get randomly kicked out on a page click. That doesn’t necessarily solve the underlying issue as to why the garbage collection breaks (if that is even the issue).

If I can’t quickly figure it out I would be happy to pay someone to help me review and change settings if they are very experienced via a screenshare.

Nextcloud version (eg, 12.0.2): 12.0.5
Operating system and version (eg, Ubuntu 17.04): mix of windows and mac, web ui only
Apache or nginx version (eg, Apache 2.4.25):
PHP version (eg, 7.1): 7.1

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): No, it intermittently happens only via the web browser UI

Steps to replicate it:

  1. navigate the web ui
  2. eventually, if you did not check “Keep me logged in” when it throws the error you get logged out
  3. If you had checked that, it kicks you back to the root / home page
  4. Error: “Problem loading page, reloading in 5 seconds”

The output of your Nextcloud log in Admin > Logging:

no errors

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

config.php only has a few settings besides sensitive info:

dbtype' => 'mysql',
  'version' => '12.0.5.3',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,

The output of your Apache/nginx/system log in /var/log/____:

i don't think i have access to this.

This looks like timeout in php routine

might try to change some value in:
nano /etc/php/7.0/cli/php.ini or whatever version you use

max_execution_time = 60
max_input_time = 90
opcache.memory_consumption=128