You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/01/11 21:53:32 UTC

[GitHub] [superset] betodealmeida commented on pull request #18001: feat: shorter timeout on test_connection

betodealmeida commented on pull request #18001:
URL: https://github.com/apache/superset/pull/18001#issuecomment-1010392083


   > @betodealmeida out of interest in a slow ping problematic? I gather adding and thus testings a database connection—except if it is used for offline monitoring—is somewhat of a rare event.
   
   We saw a lot of errors when people are trying to setup their databases, with a lot of people simply giving up. Because of that we're trying to make the process less error-prone, or at least quicker.
   
   > Additionally are there specific database engines which may take minutes to ping? Asking to learn as the default SQLAlchemy ping is merely a `SELECT 1` per [here](https://github.com/sqlalchemy/sqlalchemy/blob/ad244b9b7577486bd4e22d74d64e35802af84977/lib/sqlalchemy/engine/default.py#L572-L586).
   
   When the DB connects successfully the ping is fast. The problem is that if the URL is incorrect it might take a long time for the test to fail, which only happens when the Superset <--> DB connection times out. If it takes more than 30 seconds to run `SELECT 1` it's better to fail early, IMHO, because the SQLAlchemy URI is probably incorrect.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org