Results 1 to 10 of 10

Thread: Query error

  1. #1
    Join Date
    Jan 2010
    Posts
    21

    Unanswered: Query error

    Hi,

    I am trying to execute a query using multiple threads but from each thread that I created I get an error while executing the statement.

    SQL10003C There are not enough system resources to process the request. The request cannot be processed.

    DB Info
    -------
    OS: - HP-UX
    Version: - DB2 v9.7 fixpack 1

    Client
    ------
    OS: - Windows 32-bit
    Version: - DB2 Client v9.7 fixpack 1

    db2diag.log on the client
    ------------------------

    2014-03-19-20.09.22.938000+330 E983H615 LEVEL: Warning (OS)
    PID : 2636 TID : 3384 PROC : ThreadTest1.exe
    INSTANCE: DB2 NODE : 000
    APPID : 10.10.46.24.37636.140319143804
    FUNCTION: DB2 UDB, SQO Memory Management, sqloLogMemoryCondition, probe:100
    CALLED : OS, -, VirtualAlloc
    OSERR : 8 "Not enough storage is available to process this command."
    MESSAGE : Private memory and/or virtual address space exhausted
    DATA #1 : Requested size, PD_TYPE_MEM_REQUESTED_SIZE, 4 bytes
    2090860544
    DATA #2 : Current set size, PD_TYPE_SET_SIZE, 4 bytes
    52297728

    2014-03-19-20.09.22.938000+330 E1600H615 LEVEL: Warning
    PID : 2636 TID : 3384 PROC : ThreadTest1.exe
    INSTANCE: DB2 NODE : 000
    APPID : 10.10.46.24.37636.140319143804
    FUNCTION: DB2 UDB, SQO Memory Management, sqloMemLogPoolConditions, probe:30
    DATA #1 : <preformatted>
    Out of memory failure for Common Client Context Heap.
    Requested block size : 2090843392 bytes.
    Physical heap size : 65536 bytes.
    Configured heap size : 4294901760 bytes.
    Unreserved memory used by heap : 0 bytes.
    Unreserved memory left in set : 0 bytes.

    I have attached the DBM and DB configuration text file. DB2 Memory tracker info as well. Also, the source code file along with the bufferpool snapshot.

    Any help will be highly appreciated.

    Regards.
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2

  3. #3
    Join Date
    Jan 2010
    Posts
    21
    Hi Florin,

    I am still getting the same error even following the link that you provided. I updated my DB2 server and client to fix pack 9. but no improvement.

    I reset my db and dbm configuration settings to default but no luck. I have attached the configuration files for your reference.

    Also, on windows XP 32-bit client, I enabled the 3GB switch in the boot configuration.

    I executed the following command as well

    db2set DB2MEMDISCLAIM=NO

    Regards.
    Attached Files Attached Files

  4. #4
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    Did you get IBM's sample program dbthrds.sqc working in your environment?

  5. #5
    Join Date
    Jan 2010
    Posts
    21
    I ran the dbthrds.sqc program and it works fine. But this program does not uses CLI api.

    I am trying to accomplish multithreading through CLI api as my application uses CLI api. Is it possible as the documentation says that CLI serializes call to the database.

    Thanks for the help.

  6. #6
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    dbthrds.sqc - shows working usage of the Windows threading api and CLI context APIs. I believe the context APIs allow non-serialised access to the database. (I believe this applies for CLI and for the libdb2 apis used by the db2 preprocessor)

    If you take a CLI trace of the working code (dbthrds.sqc), and a CLI trace of your failing code, and compare the working and failing traces, you might learn new facts...

  7. #7
    Join Date
    Nov 2011
    Posts
    334
    Hi,salman83
    Another thing i think you can try is to set a small value for the parameter SQL_ATTR_BLOCK_FOR_NROWS (eg ,100 at first )。

  8. #8
    Join Date
    Jan 2010
    Posts
    21
    Hi,
    Thanks for the reply.

    I checked my code with the sample code but could not find any difference apart from them using context APIs all, not CLI.

    I also changed the SQL_ATTR_BLOCK_FOR_NROWS to 100 but no improvement.

    Regards.

  9. #9
    Join Date
    Jan 2010
    Posts
    21
    Do you know any CLI sample that performs the multi-threading tasks on the DB2

  10. #10
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    Did you compare the CLI traces as previously suggested?

Posting Permissions

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