Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2016

    Unanswered: Probable DB Connection issues with a continuous remote script execution

    Dear Experts,
    I have a groovy script which connects to a MS SQL DB (2012, Standard edition) and performs a select query and retrieves the rows and performs some simple operations on the extracted results. However, I see that my script fails after few days of running. I have enabled put a try-catch exception and see that the error is occurring while I execute the select query.

    If I stop my script and start it again, everything works fine for couple more days.

    When the issue occurs, I can see that the exception is caught and it prints the exception line in error logs.

    I suspect the issue is due to connection/timeout issues. Can someone please suggest what DB configuration that I should be looking for to identify and fix the error?

    Here are the features of my script.

    Init block - Establishes connection to the DB. Runs only once when i start the script

    Process block - Performs a select query when there are new inputs in my applications. It passes those inputs to extract relevant rows from the script.

    Destroy block - Closes the connection to DB when the script is stopped.

    Below is the excerpt of my script which is causing the issue.

    try {
    connection.eachRow("select name, ip_address from SN_NETGEAR_MANUAL1 where ip_address = '"+nodeIP+"'",{

    if (it.ip_address != null && it.ip_address.length() > 0) {
    dbCIName =
    dbIPAddress = nodeIP

    catch (ex){
    s_log.error ("Events Enrichment for event" + event +"failed.")

    BHarath MUppireddy

  2. #2
    Join Date
    Jan 2003
    Provided Answers: 17
    Uhh. What was the error? Is it the same for each failure? Does it correspond with a restart of the SQL Service?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts