ORA-21561 OID generation failed in Windows platform

We are getting the ORA-21661 error while our application is reached near about 60 to 70 connection then our application starts throwing this error after 10-20 minutes.

Error: ORA-21561 OID generation failed

We have different servers of Oracle and Application, On researching on the internet we find the issue may be the mapping of the host files. So, we make the entry of an application and Oracle IPaddress and name in both the host files of both servers.

Note: Hostname are the exact hostname got from hostname command from servers:
-- On app server
10.192.10.105 localhost  apphostname
10.192.10.106 dbhostname

--On DB Server
10.192.10.106 localhost  dbhostname
10.192.10.106 apphostname

But it did not help much, We got the Registry parameter which needs to change for fixed the issue.

Solution:

We need to change the size of the desktop heap to fix the issue in both the Database and the Application Server. Reboot the system is necessary to make the changes in effects.

  1. In the Registry Editor, Go to the following registry location:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems

2. In the right panel, modify the window registry value.

%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,20480,768 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16

3. We need to edit the window registry value and increase the third parameter of the SharedSection parameter. It’s in Kb Size.

SharedSection=1024,20480,768 to SharedSection=1024,20480,4098

4. As we did the changes on both application and database servers.

5. Changes on both the application and database server fixed our issue.

For more detail about parameters SharedSection:

SharedSection=xxxx,yyyy,zzzz
The default values are 1024,20480,768
All the values are in kilobytes (KB).
xxxx = System-wide Heapsize. There is no need to modify this value and it is ignored for the rest of this discussion.
yyyy = IO Desktop Heapsize. This is the heap for memory objects in the IO Desktop.
zzzz = Non-IO Desktop Heapsize. This is the heap for memory objects in the Non-IO Desktop.

Following information for calculating the value of the third parameter:

Please follows the link for more details:

https://support.unicomsi.com/manuals/systemarchitect/11482/starthelp.html#page/SA_XT_for_web_access/SystemArchitectXT.1.66.html

In Windows the amount of Desktop heap available can be modified in the following registry subkey:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows

The default value for this subkey usually looks like the following:
%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,20480,768 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16

The SharedSectionentry in this subkey controls the number of KBytes allocated to each of three different types of Desktop Heaps.

System Architect XT uses the third value(768) in the SharedSection.
In this example the system will allocate 768Kb of space for all the System Architect XT sessions to share consume 37Kb per process, which will allow 20 sessions of System Architect XT to be run concurrently.
768 / 37 – 1 = 20

For executing the 100 session we need to allocate for 37 = 37 * 100= 3700 we need to set 4096 for this like
SharedSection=1024,20480,512 to SharedSection=1024,20480,4096

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.