thread stops

  • Creator
    Topic
  • #50947
    Fabio Candelora
    Participant

    Hi

    i have a problems with a cloverleaf.

    i have three threads polling data via ODBC connection from a DB2.

    Since a couple of months ..two of these threads stops after a while(24/36hours).

    from log i get this message:

    [cmd :cmd :INFO/0:push_report_cmd] Receiving a command

    [cmd :cmd :INFO/0:push_report_cmd] Received command: ‘. die’

    [cmd :cmd :INFO/0:push_report_cmd] Doing ‘die’ command with args ‘

    [cmd :cmd :INFO/0:push_report_cmd] Receiving a command

    [cmd :cmd :INFO/0:push_report_cmd] Command client went away.

Viewing 6 reply threads
  • Author
    Replies
    • #68152
      Ron Archambault
      Participant

      We have the same issue here at Piedmont with our ODBC polling threads, both oracle and sql server. We’ve implemented an Alert (using cron) that bounces the threads a couple time a day.

    • #68153
      Jim Kosloskey
      Participant

      Fabio and Ron,

      Are you both using the Cloverleaf(R) provided drivers?

      What release of Cloverleaf(R) and drivers?

      What O/S is Cloverleaf(R) running on?

      What do you mean by ‘polling’?

      We have a few ODBC connections here (DB2, Oracle, and Sql Server). These are connections that invoke Stored Procedures so there is a minimum of Sql code in the Tcl proc. The function in all is insert and update – not query.

      We have not had the lockup to which you refer but I am trying to understand what your functions are in case they are different and perhaps something we may be faced with in the future.

      I should also mention we connect and disconnect with each message.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #68154
      Ron Archambault
      Participant

      We

    • #68155
      Fabio Candelora
      Participant

      hi Jim and Ron,

      first of all thx for your support, i’m glad that i am not the only one having this problem.

      here some info:

      i use the “iSeries ODBC Driver” via tcl script

      and below the details about the cloverleaf:


      Current Platform:

         Java version: 1.3.1_09

          Java vendor: Sun Microsystems Inc.

              OS type: Windows 2000

           OS version: 5.0

              OS arch: x86

      Server Build Information:

           Version: 5.3P_REV3

              Date: Mon Feb 14 2005

              Time: 11:50:03

          Platform: Windows_NT

       Java Vendor: Sun Microsystems Inc.

       JDK Version: 1.3

      Swing Version: 1.3

       RMI Version: 1.3


      by polling i mean that i make a select on the DB2 10 rows a time in order to extract the patient_updates.

      extract of tcl code for the process is:


      ######################################################################

      # Name:  poll_patient_table

      # Purpose:  polls the patient db using an ODBC connection to view

      #             CGFORAN0 on AS400

      # UPoC type:  tps

      # Args: tps keyedlist containing the following keys:

      #       MODE    run mode (“start”, “run” or “time”)

      #       MSGID   message handle

      #       ARGS    user-supplied arguments:

      #              

      #

      # Returns: tps disposition list:

      #          

      proc poll_patient_table { args } {

         keylget args MODE mode   ;# Fetch mode

         set dispList {}        ;# Nothing to return

         # Production environment

         set driver “iSeries Access ODBC Driver”

         set connstr “DSN=DOLO_DB2;PWD=*******;UID=********”

       

         switch -exact — $mode {

             start {

                 # Perform special init functions

             # N.B.: there may or may not be a MSGID key in args  

                 package require tclodbc

             }

             run {

             # ‘run’ mode always has a MSGID; fetch and process it

                 keylget args MSGID mh

                 lappend dispList “CONTINUE $mh”

             }

             time {

                 # Timer-based processing

                           

                 # Initialize the number of last record processed

                 set lastProgressNum [get_lastProgressNum]

                 #tps_print_msg “DEBUG” “poll_patient – lastProgressNum = $lastProgressNum”        

             

               # connection to database

             database dbAna $connstr      

             #tps_print_msg “DEBUG” “poll_patient – connection to database $connstr done”

                 

             set maxCGIDM [dbAna “select MAX(CGIDM) from CGFORAN0”]

                 

             

        #  Patient database (anagrafe) fields read and corresponding list index in output    

                 #                            

                 #  0 RFSRA      TIPO RAPPORTO

                 #  1 RNLIB      ID INTERNO ANAGRAFE SMS     Patient ID

                 #  2 CGCOG      COGNOME                                 Surname

                 #  3 CGNME      NOME                                    Name

                 #  4 RDANS4     DATA DI NASCITA ASSISTITO – ANNO        Patient DOB – Year

                 #  5 RDMNS      DATA DI NASCITA ASSISTITO – MESE        Patient DOB – Month

                 #  6 RDGNS      DATA DI NASCITA ASSISTITO – GIORNO      Patient DOB – Day

                 #  7 RCSES      SESSO ASSISTITO M/F                          

                 #  8 CGGNS      COD.ISTAT COMUNE NASCITA                      

                 #  9 CGIRA      COD.ISTAT COMUNE RESIDENZA                      

                 # 10 RCCDA      CODICE CIRCOSCRIZIONE  

                 # 11 RDIST      CODICE AMBITO                                

                 # 12 RCMED      CODICE MEDICO DI BASE

                 # 13 RCODN      CODICE NAZIONE    

                 # 14 RCFIS      CODICE FISCALE                            

                 # 15 RNTES      NUMERO DI TESSERA SANITARIA

                 # 16 CGIDR      INDIRIZZO RESIDENZA  (VIA ,NR /ESP)

                 # 17 CGLRE      LOCALITA’ RESIDENZA

                 # 18 RCAPRE     CAP RESIDENZA              

                 # 19 CGULM      DATA ULTIMA MODIFICA  AAAAMMGG    

                 # 20 CGIDM      PROGRESSIVO

                 # 21 CGDEL      CANCELLATA S/N            

                 # 22 RNLIBF     ID INTERNO NUOVA PERSONA (PER FUSIONI)

                 # 23 CGTIPOV    I=INSERIMENTO V=VARIAZIONE      

                 # 24 CGIDO      INDIRIZZO DOMICILIO (VIA ,NR /ESP)                    

                 # 25 CGLOC      LOCALITA’ DOMICILIO

                 # 26 RCAPDO     CAP DOMICILIO              

                 # 27 CGIDA      COD.ISTAT COMUNE DOMICILIO  

                         

             

        tps_print_msg “DEBUG” “poll_patient – polling CGFORAN0 for rows where CGIDM > $lastProgressNum”

                 

                 set patients [dbAna “select RFSRA, RNLIB, CGCOG, CGNME, RDANS4, RDMNS, RDGNS, RCSES, CGGNS, CGIRA,

                                    RCCDA, RDIST, RCMED, RCODN, RCFIS, RNTES, CGIDR, CGLRE, RCAPRE, CGULM, CGIDM,

                                    CGDEL, RNLIBF, CGTIPOV, CGIDO, CGLOC, RCAPDO, CGIDA                      

                                    from CGFORAN0

                                    where CGIDM > $lastProgressNum

                                    fetch first 10 rows only”]

                           

                 set nrows [llength $patients]

                 if { $nrows > 0 } {

                     tps_print_msg “DEBUG” “poll_patient – select returned $nrows rows”

                 }

                 

                 

                 foreach patient $patients {

                     set surname [lindex $patient 2]

                     set name [lindex $patient 3]

                     set progr [lindex $patient 20]

                     tps_print_msg “DEBUG” “poll_patient – building msg for patient = $surname $name – CGIDM = $progr”

                     

                     set frlmsg [build_patient_frl $patient]

                     set mh [msgcreate $frlmsg]            

                     lappend dispList “CONTINUE $mh”

                     

                     set lastProgressNum $progr

                 }

                               

                 dbAna disconnect

               

                 set_lastProgressNum $lastProgressNum

             }

         # end of switch

         }

         return $dispList

      }

    • #68156
      Jim Kosloskey
      Participant

      Ron and Fabio,

      We are Cloverleaf 5.4 and 5.6 (migrating to 5.6) on an AIX platform.

      We have ODBC integrations in both Cloverleaf(R) environments using DataDirect 5.2 drivers.

      We do not have the issue you see – however we are not doing any queries only insert/updates. Maybe Queries are the issue. Just as likely though could be the use of the Oracle Client, not having the latest DataDirect Drivers, and not using the Wire protocol – or maybe a combination of each.

      Also we do not use the UPOC protocol for our ODBC activity.

      Fabio – Just to be sure – you are not using the Cloverleaf ODBC Drivers (DataDirect)?

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #68157
      Fabio Candelora
      Participant

      No as i wrote before here we use i Series ODBC Access DRiver from IBM.

    • #68158
      Jim Kosloskey
      Participant

      Fabio,

      Have you checked with IBM? I know some of their products use DataDirect under the covers.

      Does the AS/400 show any indication of having an issue at the time the thread stop happens or shortly before?

      I am just poking around here as we do not experience spontaneous thread stops for any reason.

      Have you checked the memory usage to see if you are exceeding any thresholds?

      Could it be you are establishing handles for the ODBC activity and those handles are not being released? I don’t think Cloverleaf will account for leaked handles related to ODBC but have you checked the log to see if Cloverleaf indicates there are any leaked handles?

      Are you on the latest version of the ODBC Drivers?

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

Viewing 6 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,116
Forums
28
Topics
9,292
Replies
34,432
Topic Tags
286
Empty Topic Tags
10