SYSTEM ERROR: Attempt to define too many indexes for area 6 DBI12121212
 
Forums / SmartComponent Library - Developer Forum / SYSTEM ERROR: Attempt to define too many indexes for area 6 DBI12121212

SYSTEM ERROR: Attempt to define too many indexes for area 6 DBI12121212

6 posts, 1 answered
  1. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    15 Sep 2021
    Link to this post
    We are running into an issue with this error when we moved from using a static reference to the DB table to using the dataset model class. 

    Basically, we are scanning our item table (20K) records with a static FOR EACH and calling a METHOD that will use a dataset model class for updating a DB record. We also have a service loaded when PASOE starts that is called from a replication write trigger that is also using a dataset model class for creating/updating a record (used for replicating records to ecommerce site).

    I am just posting this to see if anyone else has run into this error using the dataset model class before I move back to what we had before.

    Thanks.
  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    Answered
    15 Sep 2021 in reply to Roger Blanchard
    Link to this post
    The error typically indicates that a large number of temp-tables/datasets is left in memory (memory leak).

    DatasetModels are designed so that they get garbage collected when no other code holds a reference to them. Is it possible, that you have code keeps a reference to dataset-models?

    Also in classic ABL coding, dealing with output parameters of type DATASET-HANDLE or TABLE-HANDLE typically provide the risk of leaving dynamic tables/datasets in memory when the DELETE OBJECT for them is forgotten. 
  3. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    15 Sep 2021 in reply to Mike Fechner
    Link to this post
    >> The error typically indicates that a large number of temp-tables/datasets is left in memory (memory leak).

    Yep.

    >> DatasetModels are designed so that they get garbage collected when no other code holds a reference to them. Is it possible, that you have code keeps a reference to dataset-models?

    I have looked at this many times and cannot find a reference left. I am deleting the object when I am finished with it. I am actually going to try using the fetch data request and update the TT direct and then save to see if it makes a difference.

    >> Also in classic ABL coding, dealing with output parameters of type DATASET-HANDLE or TABLE-HANDLE typically provide the risk of leaving dynamic tables/datasets in memory when the DELETE OBJECT for them is forgotten. 

    Yep, and I have seen that knowledgebase and thought that may be the issue. The funny thing is if I log dynamic objects and then use the leakcheck.p provided by PSC there are not a bunch of DS/TT left around.

    Thanks for the input.
  4. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    15 Sep 2021 in reply to Roger Blanchard
    Link to this post
    I replaced the dataset model class with using the FetchDataRequest, updating TT and saving to backend...same results. This is odd.

  5. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    15 Sep 2021 in reply to Mike Fechner
    Link to this post
    >> Also in classic ABL coding, dealing with output parameters of type DATASET-HANDLE or TABLE-HANDLE typically provide the risk of leaving dynamic tables/datasets in memory when the DELETE OBJECT for them is forgotten. 

    Hey Mike, that was it. We had the following in a separate class that was being called by our BE and the hDset was not being deleted.

    Thanks for the input.

    ServiceInterface:InvokeMethod("Osprey.Pos.JMSBatchTable.JMSBatchTableBusinessEntity",
                                                  "CreateJMSMessage", 
                                                  INPUT-OUTPUT DATASET-HANDLE hDset, 
                                                  NEW Osprey.Pos.JMSBatchTable.JMSBatchTableParameter (ipcHeader, 
                                                                                                                                           ipcBody,
                                                                                                                                           ipcDestination,
                                                                                                                                           ipcPTPDomain)
                                                ).
  6. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    15 Sep 2021 in reply to Roger Blanchard
    Link to this post
    You're welcome. 

    Maybe - depending on the use case - using INPUT-OUTPUT DATASET-HANDLE hDset BY-REFERENCE can be an improvement. Then no copy of the dataset is created. But the flipside is, there's only one instance of the dataset, only one container for records.
6 posts, 1 answered