溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

win_64位平臺(tái)報(bào)ora-12531

發(fā)布時(shí)間:2020-09-19 05:19:56 來(lái)源:網(wǎng)絡(luò) 閱讀:1005 作者:snowhill 欄目:關(guān)系型數(shù)據(jù)庫(kù)

配置256g內(nèi)存的機(jī)器,監(jiān)聽時(shí)連得上時(shí)連不上,然后查看監(jiān)聽日志,報(bào)

TNS-12531: TNS:cannot allocate memory,也不是次次都報(bào),重復(fù)連個(gè)幾次,就這樣了;

查下MOS說(shuō)明:

win_64位平臺(tái)報(bào)ora-12531Windows: Oracle Net or Connections Via the Listener Fail with TNS-12531 On Windows 64-bit Platform (文檔 ID 1384337.1)

CAUSE

This can be caused by an inadequate setting for?Desktop Heap Size. Even if this is a 64-bit OS with high amount of memory, there is still a limitation that generates this error.
Of course, it can also be caused when the memory is actually low.? Check the resource consumption at the time of this problem.? If there is no apparent memory shortage,?
the solution documented here may resolve the issue.

SOLUTION

Check and edit the Desktop Heap size located here in the registry:

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=sx***v,4 ProfileControl=Off MaxRequestThreads=16

Focus on this section:

Windows SharedSection=1024,20480,768

The third argument is the maximum amount of heap memory allocated to non interactive desktops.?
Increase this third value and check when the TNS error disappears. There is no optimum value.?It
varies on each MS Windows server.

說(shuō)明一下:

第三個(gè) SharedSection 值 (512) 是為"非交互式"窗口站與相關(guān)聯(lián)的每個(gè)桌面桌面堆的大小。如果不存在此值為非交互式窗口站桌面堆的大小將與為交互式窗口站 (第二個(gè) SharedSection 值) 指定的大小相同。

檢查了一下這個(gè)值,為2048已經(jīng)調(diào)大,如果加大,確實(shí)能緩解這個(gè)問(wèn)題,但此時(shí)連接的會(huì)話并不多,才73個(gè),那么問(wèn)題明顯不在這;是誰(shuí)把這非交互式堆棧耗完了呢,看下了進(jìn)程數(shù),全為conhost&cmd.exe進(jìn)程,也就是這玩意用完了;

簡(jiǎn)單暴力點(diǎn),直接:taskkill /im:conhost.exe /f,沒(méi)有再報(bào)錯(cuò)了;

官方也明確說(shuō)了,這是個(gè)BUG

Bug 14324057 - Windows: "%%i was unexpected at this time" when cluvfy executes (文檔 ID 14324057.8)

在11.2.0.3.10中修復(fù);

驗(yàn)證方法:

C:\Users\oradba>%ORACLE_HOME%\bin\cluvfy?comp?nodecon?-n?all

臨時(shí)解決辦法是殺了就好了,如果做進(jìn)程分析,可以考慮用windbg做下,

首先導(dǎo)入SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols

open一個(gè)dmp文件,

windbg常用命令:

命令說(shuō)明
.loadby sos clr?加載調(diào)試擴(kuò)展(.NET4.0以下使用mscorwks)
!threadpool or !tp顯示有關(guān)托管線程池的信息
~* e!clrstack顯示所有線程的堆棧
~* e!pe顯示發(fā)生在所有線程上的最后的異常
!runaway顯示線程耗費(fèi)的CPU時(shí)間
!syncblk查看程序阻塞
.logopen記錄調(diào)試日志
vertarget查看系統(tǒng)運(yùn)行時(shí)間
!peb查看完整的進(jìn)程啟動(dòng)的命令行參數(shù),加載的DLL及環(huán)境變量等
!dml_proc查看進(jìn)程Id及進(jìn)程全路徑名稱
.cls清屏
q退出當(dāng)前調(diào)試
!analyze -v詳細(xì)顯示當(dāng)前異常信息
~0s切換到指定線程(中間的數(shù)字表示線程號(hào))
!clrstack查看線程的調(diào)用堆棧,僅提供托管代碼的堆棧跟蹤 ?參數(shù)?-p ?顯示托管方法的參數(shù)值
!printexception 或 !pe顯示當(dāng)前活動(dòng)線程上的最后一個(gè)異常
!dumpstackobjects 或 !dso顯示在當(dāng)前堆棧的邊界內(nèi)找到的所有托管對(duì)象
!dumpobj <address>或者 !do顯示對(duì)象信息,指定任何有效的對(duì)象地址,就能查看該對(duì)象的內(nèi)容
!dumparray <address>或者!da顯示數(shù)組信息
!gcroot -nostacks <address>???顯示對(duì)象內(nèi)存引用;-nostacks 選項(xiàng)將搜索限制為垃圾回收器句柄和 Freachable對(duì)象
!dumpheap –stat查看堆中的所有對(duì)象信息,包括類型信息,個(gè)數(shù),大小等
!dumpheap -mt <MT Adress> ? [-min ]查看指定類型的對(duì)象及大小,可以指定最小、大值
!eeheap -gc | -loader查看托管對(duì)象和程序結(jié)構(gòu)在內(nèi)存中占用情況
!address -summary查看進(jìn)程的內(nèi)存分布情況,包括非托管內(nèi)存
.foreach (myobj{!dumpheap -mt 008f4104-short}) {!do ${myobj}}輸出多個(gè)對(duì)象信息,該命令會(huì)對(duì)于堆中所有類型為008f4104的對(duì)象,依次調(diào)用!do命令

下載WinDGG:http://msdn.microsoft.com/en-us/windows/hardware/hh852365

64bit:http://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools_amd64/dbg_amd64.msi

32bit:http://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools/dbg_x86.msi




向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI