Load Ingest Data
Results 1 to 4 of 4

Thread: DescribedResultset leak?

  1. #1
    LouiseP is offline Junior Member
    Join Date
    Aug 2007
    Posts
    5
    Rep Power
    0

    DescribedResultset leak?

    I am "stress testing" my application.
    I do a simple read, wait one second and repeat
    Quick, sample below of the read, I connect & disconnect each time.
    If I include DescribedResultset=True it will only run for about a minute before error -2000 happens.
    Without this it runs fine.

    I'm currently working around where necessary by selecting from a chapter as a table in its own right using _PARENT

    Is there some clean up of the builder I am missing which is causing this?
    Many thanks

    Dim csBuild As New AisConnectionStringBuilder(connString)
    csBuild.DescribedResultset = True
    Using Conn As New AisConnection(csBuild.ConnectionString)
    Conn.Open()
    Using Comm As New AisCommand(strSQl, Conn)
    Comm.CommandType = CommandType.Text
    Using rs As AisDataReader = Comm.ExecuteReader
    Do While rs.Read
    ' Do Work, get chapters!
    Loop
    rs.Close()
    End Using
    End Using
    Conn.Close()
    End Using

  2. #2
    Join Date
    Sep 2006
    Posts
    233
    Rep Power
    10
    Error -2000 is usually indication of memory allocation failure. If the call runs for a minute and then returns this error then it is possible that there is some internal error.

    I you should open a support issue on this, providing the AIS version of the server and the ADO.NET provider and also information on the metadata of the specific table.

    As a side note, if you are working with complex Adabas files then using the AIS SELECT XML feature (see a reference in http://www.attunity.com/forums/ado-n...4.html#post916) will be much more efficient than using Chapters since with chapter, opening each chapter requires repeated access to the server whereas SELECT XML returns an entire ADABAS record formatted as an equivalent XML document in one roundtrip (and you can even modify it and store it back with just one more roundtrip).
    By Dror Harari

    To Find Out more About Attunity Technology:
    Attunity
    or:
    Contact Us

  3. #3
    LouiseP is offline Junior Member
    Join Date
    Aug 2007
    Posts
    5
    Rep Power
    0
    Thanks for the advice.
    Just to clarify the call itself does not run for a minute.
    The call is very quick, then I pause for a second before repeating.
    I can only do this cycle around 60 times before -2000 occurs so its not all bad!
    The xml option is certainly most interesting and one I shall probably pursue.
    Thanks again,

  4. #4
    Join Date
    Sep 2006
    Posts
    233
    Rep Power
    10
    In that case, you may also want to look at your chapter-handling code since it looks as if some resource is leaking. Since .NET does garbage collection lazily, an unused object is not reclaim immediately and thus the resources it holds may be kept around for much longer than needed.

    From the code snippet you had on your post it does appear that you are aware of this issue and are using the 'Using' keyword to properly discard of the connection, command and resultset objects.

    However, with chapters, which are also resultset object, one need to follow the same patter and failing to do so will result in the above object also being kept around (due to internal reference counting - the server connection or resultset will not really close if there is still a chapter resultset that is still active).
    By Dror Harari

    To Find Out more About Attunity Technology:
    Attunity
    or:
    Contact Us

Posting Permissions

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