Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
Information Mgmt
New to Lotus
How to buy
Live demos
Technical library
Forums & community
Java™ technology
Open source
SOA and Web services
Web development
My developerWorks
About dW
Submit content

developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum



PreviousPrevious NextNext

Richy T 7.Apr.14 05:51 AM a Web browser
Applications Development All Releases Windows 2003


I have an issue where I am getting the below error when interrogating a Notes database through my c# application.

AllocHandle: OUT OF PRIVATE HANDLES! -- pid 00000F38 Handles used so far 6339, Maximum Handles - 16440, error - 0x107

Maximum number of memory segments that Notes can support has been exceeded

I understand the error is due to the Domino private handles limit being reached which I believe is 6,339 although I've read that this has been increased to over 10,000 in more recent versions. I can't do anything about the Lotus Notes infrastructure in my company so I am trying to work around this issue.

The Notes database I need to search has 10,000 dcouments but the view can't be searched on the using the field I wan't to find. I've devised a way where I can work out the required document number I need but in the case that the value I'm looking for doesn't exist I would have to check the value of a notes item in each of the 10,000 documents. In this situation I get the above error when I hit around the 6,000 checks mark.

The code I'm using is similar to the below,

NotesSession session = new NotesSession();
NotesDatabase NotesDb = session.GetDatabase("NotesServer", "aNotesDB.nsf", false); //Open Notes Database
NotesView pwdView = NotesDb.GetView("(aNotesView)");

for (int i = startingDocNo; i <= startingDocNo + 1111; i++)

NotesDocument ndoc = pwdView.GetNthDocument(i);
NotesItem noRef = ndoc.GetFirstItem("aNotesItem");
if (aReference ==noRef.Text)
NotesItem theValue = ndoc.GetFirstItem("valueINeed");
valToReturn = theValue.Text;
theValue = null;

ndoc = null;


pwdView = null;
NotesDb = null;
session = null;

I have tried executing this code in chunks of 1,000 documents but I still get the error. I thought that as I was initializing a new NotesSession object after nullifying the previous one this would reset the handle count. I also tried spawning a new thread to process each 1,000 documents thinking if it was a new thread it could get round the limit but still no luck.

Has anyone got any ideas how to work around this problem, I'm pretty stumped!



C# Lotus Notes Problem AllocHandle:... (Richy T 7.Apr.14)
. . RE: C# Lotus Notes Problem AllocHan... (Stan Rogers 7.Apr.14)

  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds


Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds


IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite