Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

How to set timeout in a script task

$
0
0

We have a script that executes in a Script Task. The script is part of an API call.  the issue is we have to pull a large amount of data and it appears we are having timeout issues. T be exact, we can pull 30 days of data, but if we try to pull more the task crashes. Can we set a timeout in the script to allow more time to take in data? Here is the script:

        public void Main()
        {
            var webGet = new HtmlWeb();
            var document = webGet.Load(Dts.Variables["User::processUrl"].Value.ToString());
            var status = document.DocumentNode.SelectSingleNode("//div[@class='alert alert-success alert-dismissible']");
           // MessageBox.Show(status.InnerText.ToString(), "Error Title", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

            if (status.InnerText.Trim().Contains( Convert.ToString("Query ran successfully.")) )
            {
                Dts.TaskResult = (int)ScriptResults.Success;
            }
            else
            {
                Dts.TaskResult = (int)ScriptResults.Failure;
            }
        }

The Data flow for the task is here. The timeout in SQL Server Destination task is set to 0. I tried different settings ( 30 and 120) but it didn't help.

The error I receive is below:


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>