DB2 在Windows平台出现ADM0501C错误解决方案
来源:互联网 发布:笔记本锁定触摸屏软件 编辑:程序博客网 时间:2024/05/19 04:52
ADM0501C A stack overflow exception has occurred. The DB2 instance has terminated abnormally. To remedy this problem, you may increase the default stack size for db2syscs.exe using the db2hdr utility as follows: db2hdr /sqllib/bin/db2syscs.exe /s:<stackreserve>[,<stackcommit>] Note that increasing the default stack size will consume virtual memory space and may reduce the maximum number of concurrent connections. Contact IBM Support for further assistance.
ADM0501C 发生了堆栈溢出异常。DB2 实例已异常终止。要解决此问题,可以按如下所示使用 db2hdr 实用程序增加 db2syscs.exe 的缺省堆栈大小:db2hdr /sqllib/bin/db2syscs.exe /s:<stackreserve>[,<stackcommit>] 注意,增加缺省堆栈大小将消耗虚拟内存空间并且可能减少并发连接的最大数目
在出现上述错误后,我们的连接程序在操作数据库是总是报:
SQL30081N 检测到通信错误。正在使用的通信协议:"TCP/IP"。正在使用的通信API:"SOCKETS"。检测到错误的位置:"127.0.0.1"。检测到错误的通信函数:"connect"。协议特定的错误代码:"10061"、"*"、"*"。 SQLSTATE=08001
通过在DB2的帮助中心查询后:都是由于配置引起的错误。
针对错误ADM11003E在网上可以找到相关的信息,但是没有明确的指出解决的办法,但是知道了可以在系统崩溃以后通过杀死db2fmp进程后,DB2数据库可以重新启动。
我解决问题的方法是进行了下面俩项设置:
db2 update dbm cfg USING ASLHEAPSZ 20 IMMEDIATE
db2 update dbm cfg USING query_heap_sz 4000 IMMEDIATE
后经过跟踪,基本上没有再发生这个问题。
修改方式如下:
运行DB2命令行工具输入下面命令:
F:/Program Files/ibm/sqllib/misc>db2hdr.exe ../bin/db2syscs.exe /s:512,512
运行此命令需先停止DB2实例。
附上其他资料:
When dealing with stack overflow scenarios where the stack size needs to be increased, the executable of the header should only be modified if virtual address space is a concern, i.e. if there are many agents / databases living within an instance. Otherwise, it is sufficient to increase agent_stack_sz to something above 256K, eg. 512K. Note however, that increasing agent_stack_sz actually commits the space, i.e. uses real memory.
The PROBLEM::
-by default a stack space of 256K is reserved for each thread in db2syscs.exe regardless of agent_stack_sz. This information is stored in the header of executable. The Windows default is 1MB, and we override this to conserve virtual address space. AGENT_STACK_SZ is only the committed stack - it does not represent the limit.
-If we set agent_stack_sz to 512K, the reserved stack space is actually 1MB (the granularity for reserved stack space when specified on CreateThread is 256K -> 1MB -> 2MB -> 4MB)
-This means that if we only really need 512K, we are wasting 0.5MB of address space per agent, and this can add up - All resources for databases in an instance and ALL threads (agents,prefetchers, etc.) must live within the same 2GB address space on 32-bit Windows (3GB for NT / Win2K Advanced Server / Datacenter with /3GB switch in boot.ini).
There are two ways to increase the stack size. It is not necessary to do both.
Note the committed stack will be the value of agent_stack_sz regardless,
i.e. the committed memory will be max(agent_stack_sz, stack actually used).
1. modify the header of the executable (db2hdr will do this) - this is the default reserved stack space per thread. This affects ALL threads.
2. increase agent stack size. This only affects AGENT threads. This is the simplest and is the preferred method.
Disadvantages to (1):
- must be repeated after any upgrades
- increases stack space for *ALL* threads, not just agents, which may be significant if there are a large number of prefetchers & pagecleaners. This increases use of virtual address space.
Advantages to (1):
- more granularity - saves virtual address space by requiring less stack space for agents
Disadvantages to (2):
- wastes virtual address space by reserving excess stack space which may be unacceptable if there are a large number of agents and/or address space is otherwise constrained .
Advantages to (2):
- nothing to ship, supported and documented, change carries through upgrades
- affects only agents, which usually need the extra stack space during statement compilation
SUMMARY: Use agent_stack_sz to increase stack space unless there is a concern with virtual address space.
Examples. (assuming 2GB address space) Monitor Virtual bytes using perfmon.
1. 10 agents max - increase agent_stack_sz
2. 100 agents, 1 GB current private bytes max for db2syscs.exe - increase agent_stack_sz
3. 100 agents, 1.5GB current private bytes max for db2syscs.exe - modify the header
4. 500 agents, 1GB, current private bytes max for db2syscs.exe - modify the header
IMPORTANT:
when setting agent_stack_sz , set the value to be 1 4K page less than the desired maximum.
Windows adds an additional "guard page" to the specified size.
i.e. setting a value of 256K will mean 260K, and we jump up to the next level of granularity for reserved stack, eg. 1MB.
Examples:
agent_stack_sz <= 63 to stay within the range of reserving 256K of stack space.
agent_stack_sz <= 255 to stay withini the range of reserving 1MB of stack space
agent_stack_sz <= ( 1 4K page less than the default reserved stack space set with db2hdr )
SIMPLE FIX: set agent_stack_sz to 64, which is the minimum value which will increase the reserved stack to 1MB.
- DB2 在Windows平台出现ADM0501C错误解决方案
- 关于DB2数据库的ADM11003E和ADM0501C错误的处理
- 在windows平台下使用Git CMD使用reset命令出现More?错误的解决方案
- 在Windows平台下使用Qt Creator,出现找不到mingwm10.dll错误提示
- 在Windows和UNIX/Linux平台上完全卸载DB2
- db2数据插入出现错误!!
- DB2中出现SQL1032N错误
- Ubuntu安装DB2出现错误
- 从Windows到Mac迁移Android项目出现错误解决方案
- windows下添加conda源出现404错误解决方案。
- QT出现错误 解决方案
- pomelo在android编译时出现的错误解决方案
- 有效的在Windows和UNIX/Linux平台上完全卸载DB2
- db2 常见错误以及解决方案[ErrorCode SQLState]
- db2 常见错误以及解决方案[ErrorCode SQLState]
- db2 常见错误以及解决方案[ErrorCode SQLState]
- db2 常见错误以及解决方案[ErrorCode SQLState]
- JAVA 远程连接db2 windows 平台
- 最基本最常用的DOS命令
- 名词复数的规则变化
- 常用网络命令
- MSXML 解析 XML
- 专家剖析黑客如何通过Google发动攻击
- DB2 在Windows平台出现ADM0501C错误解决方案
- 黑客必学的六条系统命令
- 跟Steve Jobs学简报[1-3](恋花蝶整理版)
- use comparevalidator to validate droodownlist
- 纹理特征的提取
- 《程序设计实践》的设计原则
- 互联网最滑稽又讽刺的十个言论
- Eclipse中无法引入javax.Faces.*
- VS2005如何进行单元测试.