In technote 1199776, it has following statement. Because of business needs ,customer cannot use methods to access databases locally only. Customer needs "recycle" function to release network resource when opening remote databases via a web application.
*****************************
Problem
In IBM Lotus Domino Designer, network resources are not released as expected when opening remote databases via a web application.
Scenario:
Your organization hosts a web application that opens databases on remote Domino servers programmatically. This is accomplished via LotusScript, Java, or formula language calls to a server, other than the server that hosts the web application. The network ports associated with the remote database connection are not released until the HTTP task is shut down. For example, issuing a "netstat" or a "show port tcpip" command on your Domino Server console displays several connections open to the server where the remote database is hosted. Once the HTTP task quits issuing these commands, the connections are released.
When network resources are allocated as a consequence of opening a remote database, these connections are only released when the thread that allocated them terminates. In the case of web applications, worker threads belonging to the HTTP task will execute web-triggered agents, Java servlets (using the Domino Java Servlet Manager), or formula language statements in a web application. HTTP utilizes thread pooling, so these threads are persistent and are only terminated once the HTTP task is shut down. This results in the problem described above.
Workaround 1:
Basically, HTTP does not release sessions created to remote Notes servers via Java, Lotus Script, or formulas, such as getDatabase() or @DbLookup, and this causes the TCP/IP protocol stack to report that it ran memory.
As a rule of thumb for HTTP triggered agents, forms, or servlets, you should only use these methods to access databases locally, and when they do access local databases, they should always use a null string instead of the server name.
For example:
s.GetDatabase("server/org", "names.nsf") ----> s.GetDatabase("", "names.nsf")
@DbLookup("Notes" : "NoCache"; "server/org" : "names.nsf"; "People"; adjName; "OfficePhoneNumber");
----> @DbLookup("Notes" : "NoCache"; "" : "names.nsf"; "People"; adjName; "OfficePhoneNumber");
Moved to Domino Designer
This needs to be moved to Domino Designer & AppDev section. Does not apply to AppDev Pack