Extremely long SQL connection timing on first bot connection

Hey guys I have a question on the ‘Database Connection’ activity. I’m noticing extremely long and delayed connections into our SQL databases when the bot first starts up (first time it hits the SQL connection); consecutive attempts don’t take as long.

Right now we have the bot setup to timeout the connected at 5 minutes in order to not fail the bot. What were seeing is a query that should take 0.2 seconds to query (and works this quickly with Automation Anywhere or manually querying) can take as long as 3 minutes in UiPath.

Has anyone else noticed this type of behavior? Is it a possible bug with the program? Or is there any way to execute the connection more quickly?

Hello @cssc!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff

Maybe not a ready answer, but in case you would like to check out the activity source code, it is one of the ones that is hosted on our Community GitHub here:

To be more concrete though:

  • is it the latest Studio version?
  • what is the activity package version?
  • which activity has a long response time → the one connecting or the one executing the query (or both?)

Hey @loginerror,

  • UiPath Studio Version 2019.10.4
  • I’m using whichever is the latest version of the UiPath Database Package for download.
  • The ‘Connection’ activity is the one I’m having issue with – typically just the first time the individual bot goes to make the connection, after that point if seems fine through multiple iterations.

Just to confirm - this initial connection slowness does not happen if you try to connect to the database with any other application, just with Studio?

Does it change between machines and/or network?

Also, does it happen when you try to connect to some other database?

I can imagine some of these questions could be harder to test, but it would give some more context to the issue.

Correct, its noticed in Studio (not MS SQL or Automation Anywhere for example) but more so with the individual Bots so I guess the technically correct answer would be with the ‘Ui Robot’ program – not sure if it really differs that much from just running from studio.

Occurs with multiple database servers (we’ve tested two pretty thoroughly), and yes we get the same result across multiple VMs. I’m just trying to see if its anything specific to UiPath, since running the same connections on AA seems to work okay, or if its something else that we havne’t ruled out yet.