Oracle Maximum opened cursors exceeded 
Author Message
 Oracle Maximum opened cursors exceeded

I tried the following on a DBConnection inspector:

        | indexes |
        indexes := OrderedCollection new.
        self tables do: [ :aTable |
                indexes add: (self indicesOf: aTable type: 1) ].

        ^indexes

In Oracle I have the problem that the number of opened cursors are over 300 (my limit).
Is there any way to close cursors in the middle of the "do:" process?
Thanks,
Santiago



Mon, 09 Aug 2004 06:12:07 GMT  
 Oracle Maximum opened cursors exceeded


...

Quote:
> In Oracle I have the problem that the number of opened cursors are over
300 (my limit).
> Is there any way to close cursors in the middle of the "do:" process?

I have not done exactly what you are doing, so perhaps someone with more
context specific knowledge can provide a more appropriate answer.  However I
have run into similar DB resource exhaustion issues in tight loops with many
queries.  The solution has usually be to include a slight delay in order to
force a garbage collection.

ex: (Delay forMilliseconds: 600) wait

I am not sure exactly how much time is required, I am using 600 ms in one of
my loops.  If you use a counter you might be able to use the delay every 50
iterations or something if speed is important.  If you do a news archive
search I suspect you will see some previous discussion about this issue.

Chris



Mon, 09 Aug 2004 11:13:01 GMT  
 Oracle Maximum opened cursors exceeded
Santiago

Quote:

> I tried the following on a DBConnection inspector:

> | indexes |
> indexes := OrderedCollection new.
> self tables do: [ :aTable |
> indexes add: (self indicesOf: aTable type: 1) ].

> ^indexes

> In Oracle I have the problem that the number of opened cursors are over
300 (my limit).
> Is there any way to close cursors in the middle of the "do:" process?

The attached implementation of DBConnection>>indicesOf:type: (from Dolphin
5.0) does precisely that.

Another approach would be to insert a 'MemoryManager current
administerLastRites' into your loop.

Regards

Blair

------------------
!DBConnection methodsFor!

indicesOf: aString type: anInteger
 "Answer a list of the indices on the table named aString
 of type anInteger"

 | stmt answer |
 stmt := DBStatisticsStatement parent: self.
 stmt
  tableName: aString;
  type: anInteger;
  accurate: true.
 answer := stmt results asOrderedCollection.
 stmt free.
 ^answer! !
!DBConnection categoriesFor: #indicesOf:type:!enquiries!public! !



Mon, 09 Aug 2004 18:04:01 GMT  
 Oracle Maximum opened cursors exceeded

Quote:


> ....
> > In Oracle I have the problem that the number of opened cursors are over
> 300 (my limit).
> > Is there any way to close cursors in the middle of the "do:" process?

> I have not done exactly what you are doing, so perhaps someone with more
> context specific knowledge can provide a more appropriate answer.  However I
> have run into similar DB resource exhaustion issues in tight loops with many
> queries.  The solution has usually be to include a slight delay in order to
> force a garbage collection.

> ex: (Delay forMilliseconds: 600) wait

> I am not sure exactly how much time is required, I am using 600 ms in one of
> my loops.  If you use a counter you might be able to use the delay every 50
> iterations or something if speed is important.  If you do a news archive
> search I suspect you will see some previous discussion about this issue.

> Chris

Thank you Chris. The delay works fine.

Santiago



Mon, 09 Aug 2004 23:26:33 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. BLX286: 1305 Maximum selector limit exceeded

2. ;Aborting!: maximum recursion depth exceeded

3. regexp: maximum recursion limit exceeded

4. Fatal error: Maximum execution time of 30 seconds exceeded

5. ValueError: Maximum content length exceeded

6. maximum recursion depth exceeded

7. re module - Maximum recursion limit exceeded.

8. Mr. Oracle's Technology Wealth Now Exceeds That of Mr. MSFT

9. Maximum number of open files reached

10. Maximum open files

11. 9/014 maximum # of files open need to set limit

12. Maximum number of open files

 

 
Powered by phpBB® Forum Software