DB Connector (Labs) - disable background connection polling

This is a strange phenomena that turned out to be a pain in the backside.
Apparently configured DB Connector (Labs) nodes make multiple attempts to connect to the database in the background when simply opening the workflow containing them. This happens in the background, without executing any of the nodes.
This seems harmless, but in my case the DBMS is configured to block the account after several attempts with invalid password, and we also have a silly password expiry policy that notifies after the expiry and prompts to change password on next login.
So every time my password expires I get locked out of my account by simply opening a KNIME workflow with DB Connectors in it that are configured with the old password, before I get the chance to change them.
In this particular case I use wrapped metanodes saved as templates.

Is there a way to configure KNIME or the nodes themselves not to poll the connection unless the nodes are executing?

Hello Dimitri,
interesting point. We have changed the connection backend for the summer release. It will only try once to connect to the database. However it would do so for every DB Connector in the workflow.

For the future we could add a new option to the Advanced tab (see below) of the DB Connector nodes to let KNIME initialize the connection lazy e.g. the first time when the connection is needed. By default this would be disabled because this way the connector node would be green and without any warning but any subsequent node which would use the connection first would fail with a connection problem error message.

What do you think about such a solution?
Bye
Tobias

1 Like

This advanced option would definitely solve the issue, although I see the predicament of lazy connection. Would it be possible to write a warning in the console to advise the user that some connector nodes use lazy connection? That might help avoiding confusion around the downstream errors.

Also, with only one polling attempt it should be OK (at least in my case) even without lazy connection, as all of my workflows use a single connector node feeding multiple downstream components, and it is a wrapped metanode linked to a template. So I guess that the following password update method will be fine without setting lazy connection:

  1. Open KNIME
  2. Navigate to the template workflow
  3. Unlink, update and re-link (overwrite) wrapped connector metanode with the new password
  4. Close template workflow
  5. Open a workflow that uses linked connector node
  6. Respond to node update prompt and update the linked node, save & close the workflow
  7. Repeat steps 5 and 6 as required

I assume this method will not trigger multiple connection attempts with an expired password - is that correct?

1 Like

Correct this shouldn’t trigger multiple connection tries. If you want to you can try it with the latest nightly build which has already the new connection management backend.
Have a nice weekend
Tobias

1 Like