본문 바로가기

oracle

TNS-12531: TNS:cannot allocate memory

728x90

window server oracle db 운영 시 TNS-12531: TNS:cannot allocate memory 발생 하면서 리스너를 통한 DB  접속 불가 발생

원인 : window server의 heap size 부족이거나 실제 window server의 메모리 부족으로도 발생할 수 있음

해결 :

Launch regedt32 and go to:

\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems\

In the right pane, click on Windows and pull down Edit then select Modify.

You should see a string that resembles this in its entirety:

%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 ServerDll=sxssrv,4 ProfileControl=Off MaxRequestThreads=16

Focus on this section:

Windows SharedSection=1024,20480,768

세번째 밑줄 친 값이 서버에 할당 된 heap 메모리 값입니다. 이 값을 증가시키고 window server 재기동을 수행하면 오류 해소가 됨 최적의 값은 없기 때문에 서버마다 점차적으로 늘리는것을 권장

 

참고 : oracle doc (Doc ID 1384337.1)

728x90