WordPress showing install screen after max_questions error
I am working in a PHO environment in Heroku with ClearDB. At some point (really low), I get this error:
WordPress database error User 'XX' has exceeded the 'max_questions' resource (current value: 3600) for query SHOW TABLES LIKE 'wp_users' made by display_setup_form.
I guess this is an error due to use the free database plan of ClearDB. However, after getting that error (spotted in the server logs), the server is redirecting to the install screen.
Is there any way to catch that error, and avoid showing the install screen?