disable setup setting just prevents the setup page from executing any setup actions, it does not prevent the redirect to setup that will occur if the site cannot connect to the database. This should not happen on a regular basis under normal operating circumstances. The evidence suggests that there are still problems with the database, you are not getting a reliable connection to the db if that is happening. Odds are that you will see database timeout or other database errors in the log.