互联网服务db2 9.1

数据库报错There are not enough system resources to process the request

如题,数据库运行一些命令时老是报错如下:2014-08-18-14.03.03.254913+480 E518946233A1490    LEVEL: Warning (OS)
PID     : 1699904              TID  : 1           PROC : db2agent (instance) 0
INSTANCE: pjt                  NODE : 000
APPHDL  : 0-1744               APPID: *LOCAL.pjt.140818060303
AUTHID  : UNIONMON
FUNCTION: DB2 UDB, SQO Memory Management, sqloLogMemoryCondition, probe:100
CALLED  : OS, -, malloc
OSERR   : ENOMEM (12) "Not enough space"
MESSAGE : Private memory and/or virtual address space exhausted, or data ulimit
          exceeded
DATA #1 : Soft data resource limit, PD_TYPE_RLIM_DATA_CUR, 8 bytes
251657728
DATA #2 : Requested size, PD_TYPE_MEM_REQUESTED_SIZE, 8 bytes
150802432
DATA #3 : Current set size, PD_TYPE_SET_SIZE, 8 bytes
8650752
CALLSTCK:
  [0] 0x09000000026532B4 sqloLogMemoryCondition + 0x26C
  [1] 0x0900000002652F90 sqloLogMemoryCondition@glue216 + 0x74
  [2] 0x0900000003543018 sqlogmblkEx + 0xC
  [3] 0x0900000003342CE0 sqledConvertDDtoSqlda + 0x348
  [4] 0x09000000033433A8 sqlerCallDL__FP14db2UCinterfaceP9UCstpInfo + 0x1BC
  [5] 0x09000000033D8554 sqljs_ddm_excsqlstt__FP14db2UCinterfaceP14sqljsDDMObject + 0xD4
  [6] 0x09000000033E4FBC sqljsParseRdbAccessed__FP13sqljsDrdaAsCbP14sqljsDDMObjectP14db2UCinterface + 0xFFFFFFFFFFFFFFB8
  [7] 0x09000000033E4DC8 sqljsParse__FP13sqljsDrdaAsCbP14db2UCinterface + 0x27C
  [8] 0x09000000033E6248 @48@sqljsSqlam__FP14db2UCinterfaceP13sqle_agent_cbb + 0xC4
  [9] 0x0900000002F0E204 @48@sqljsDriveRequests__FP13sqle_agent_cbP11UCconHandle + 0x98

2014-08-18-14.03.03.255248+480 E518947724A654     LEVEL: Warning
PID     : 1699904              TID  : 1           PROC : db2agent (instance) 0
INSTANCE: pjt                  NODE : 000
APPHDL  : 0-1744               APPID: *LOCAL.pjt.140818060303
AUTHID  : UNIONMON
FUNCTION: DB2 UDB, SQO Memory Management, sqloMemLogPoolConditions, probe:30
DATA #1 :
Out of memory failure for Private Heap on node 0.
Requested block size           : 150777024 bytes.
Physical heap size             : 196608 bytes.
Configured heap size           : 1099511824384 bytes.
Unreserved memory used by heap : 0 bytes.
Unreserved memory left in set  : 0 bytes.

2014-08-18-14.03.03.255344+480 I518948379A502     LEVEL: Severe
PID     : 1699904              TID  : 1           PROC : db2agent (instance) 0
INSTANCE: pjt                  NODE : 000
APPHDL  : 0-1744               APPID: *LOCAL.pjt.140818060303
AUTHID  : UNIONMON
FUNCTION: DB2 UDB, routine_infrastructure, sqlerCallDL, probe:20
RETCODE : ZRC=0x8B0F0000=-1961951232=SQLO_NOMEM
          "No Memory Available (reason code is id of requested heap)"
          DIA8300C A memory heap error has occurred.


——————————————————————————————————————————————————

比如我看动态sql:db2pd -d dbname -dyn
看dyn的快照视图:db2 "select * from sysibmadm.snapdyn_sql"
一运行,db2diag日志就是报这些错误,关于内存这块,不知道该如何下手。

$ db2level
DB21085I  Instance "pjt" uses "64" bits and DB2 code release "SQL09011" with
level identifier "01020107".
Informational tokens are "DB2 v9.1.0.1", "s061104", "U809676", and Fix Pack
"1".
Product is installed at "/opt/IBM/db2/V9.1".


$ ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         245760
stack(kbytes)        16384
memory(kbytes)       unlimited
coredump(blocks)     unlimited
nofiles(descriptors) 2000


Sort heap thres for shared sorts (4KB) (SHEAPTHRES_SHR) = 80000
Sort list heap (4KB)                         (SORTHEAP) = 40000
Database heap (4KB)                            (DBHEAP) = 16384
Utilities heap size (4KB)                (UTIL_HEAP_SZ) = 90359
Percent of mem for appl. group heap   (GROUPHEAP_RATIO) = 70
Max appl. control heap size (4KB)     (APP_CTL_HEAP_SZ) = 8096
SQL statement heap (4KB)                     (STMTHEAP) = 40000
Default application heap (4KB)             (APPLHEAPSZ) = 60000
Statistics heap size (4KB)               (STAT_HEAP_SZ) = 16384
参与13

12同行回答

wonder_191wonder_191数据库运维工程师北京融海数据科技股份有限公司
回复 7# zgrrzg22    dbm  cfgatabase Manager Configuration     Node type = Enterprise Server Edition with local and remote clients Database manager configuration release level        &nb...显示全部
回复 7# zgrrzg22


   dbm  cfgatabase Manager Configuration

     Node type = Enterprise Server Edition with local and remote clients

Database manager configuration release level            = 0x0b00

CPU speed (millisec/instruction)             (CPUSPEED) = 2.361721e-07
Communications bandwidth (MB/sec)      (COMM_BANDWIDTH) = 1.000000e+02

Max number of concurrently active databases     (NUMDB) = 8
Federated Database System Support           (FEDERATED) = NO
Transaction processor monitor name        (TP_MON_NAME) =

Default charge-back account           (DFT_ACCOUNT_STR) =

Java Development Kit installation path       (JDK_PATH) = /db2home/pjt/sqllib/java/jdk64

Diagnostic error capture level              (DIAGLEVEL) = 3
Notify Level                              (NOTIFYLEVEL) = 3
Diagnostic data directory path               (DIAGPATH) = /db2data/db2dump

Default database monitor switches
   Buffer pool                         (DFT_MON_BUFPOOL) = ON
   Lock                                   (DFT_MON_LOCK) = ON
   Sort                                   (DFT_MON_SORT) = ON
   Statement                              (DFT_MON_STMT) = ON
   Table                                 (DFT_MON_TABLE) = ON
   Timestamp                         (DFT_MON_TIMESTAMP) = ON
   Unit of work                            (DFT_MON_UOW) = ON
Monitor health of instance and databases   (HEALTH_MON) = ON

SYSADM group name                        (SYSADM_GROUP) = DB2IADM1
SYSCTRL group name                      (SYSCTRL_GROUP) =
SYSMAINT group name                    (SYSMAINT_GROUP) =
SYSMON group name                        (SYSMON_GROUP) =

Client Userid-Password Plugin          (CLNT_PW_PLUGIN) =
Client Kerberos Plugin                (CLNT_KRB_PLUGIN) =
Group Plugin                             (GROUP_PLUGIN) =
GSS Plugin for Local Authorization    (LOCAL_GSSPLUGIN) =
Server Plugin Mode                    (SRV_PLUGIN_MODE) = UNFENCED
Server List of GSS Plugins      (SRVCON_GSSPLUGIN_LIST) =
Server Userid-Password Plugin        (SRVCON_PW_PLUGIN) =
Server Connection Authentication          (SRVCON_AUTH) = NOT_SPECIFIED
Database manager authentication        (AUTHENTICATION) = SERVER_ENCRYPT
Cataloging allowed without authority   (CATALOG_NOAUTH) = NO
Trust all clients                      (TRUST_ALLCLNTS) = YES
Trusted client authentication          (TRUST_CLNTAUTH) = CLIENT
Bypass federated authentication            (FED_NOAUTH) = NO

Default database path                       (DFTDBPATH) = /db2home/pjt

Database monitor heap size (4KB)          (MON_HEAP_SZ) = 40960
Java Virtual Machine heap size (4KB)     (JAVA_HEAP_SZ) = 2048
Audit buffer size (4KB)                  (AUDIT_BUF_SZ) = 0
Size of instance shared memory (4KB)  (INSTANCE_MEMORY) = AUTOMATIC
Backup buffer default size (4KB)            (BACKBUFSZ) = 1024
Restore buffer default size (4KB)           (RESTBUFSZ) = 1024

Sort heap threshold (4KB)                  (SHEAPTHRES) = 0

Directory cache support                     (DIR_CACHE) = YES

Application support layer heap size (4KB)   (ASLHEAPSZ) = 15
Max requester I/O block size (bytes)         (RQRIOBLK) = 32767
Query heap size (4KB)                   (QUERY_HEAP_SZ) = 1000

Workload impact by throttled utilities(UTIL_IMPACT_LIM) = 10

Priority of agents                           (AGENTPRI) = SYSTEM
Max number of existing agents               (MAXAGENTS) = 2000
Agent pool size                        (NUM_POOLAGENTS) = 1600
Initial number of agents in pool       (NUM_INITAGENTS) = 0
Max number of coordinating agents     (MAX_COORDAGENTS) = MAXAGENTS
Max no. of concurrent coordinating agents  (MAXCAGENTS) = MAX_COORDAGENTS
Max number of client connections      (MAX_CONNECTIONS) = MAX_COORDAGENTS

Keep fenced process                        (KEEPFENCED) = YES
Number of pooled fenced processes         (FENCED_POOL) = MAX_COORDAGENTS
Initial number of fenced processes     (NUM_INITFENCED) = 0

Index re-creation time and redo index build  (INDEXREC) = RESTART

Transaction manager database name         (TM_DATABASE) = 1ST_CONN
Transaction resync interval (sec)     (RESYNC_INTERVAL) = 180

SPM name                                     (SPM_NAME) =
SPM log size                          (SPM_LOG_FILE_SZ) = 256
SPM resync agent limit                 (SPM_MAX_RESYNC) = 20
SPM log path                             (SPM_LOG_PATH) =

TCP/IP Service name                          (SVCENAME) = 50000
Discovery mode                               (DISCOVER) = SEARCH
Discover server instance                (DISCOVER_INST) = ENABLE

Maximum query degree of parallelism   (MAX_QUERYDEGREE) = ANY
Enable intra-partition parallelism     (INTRA_PARALLEL) = NO

Maximum Asynchronous TQs per query    (FEDERATED_ASYNC) = 0

No. of int. communication buffers(4KB)(FCM_NUM_BUFFERS) = AUTOMATIC
No. of int. communication channels   (FCM_NUM_CHANNELS) = AUTOMATIC
Node connection elapse time (sec)         (CONN_ELAPSE) = 10
Max number of node connection retries (MAX_CONNRETRIES) = 5
Max time difference between nodes (min) (MAX_TIME_DIFF) = 60

db2start/db2stop timeout (min)        (START_STOP_TIME) = 10收起
互联网服务 · 2014-08-20
浏览2605
wonder_191wonder_191数据库运维工程师北京融海数据科技股份有限公司
回复 7# zgrrzg22    db cfg   Database configuration release level                    = 0x0b00 Database release level          ...显示全部
回复 7# zgrrzg22


   db cfg   Database configuration release level                    = 0x0b00
Database release level                                  = 0x0b00

Database territory                                      = cn
Database code page                                      = 1386
Database code set                                       = gbk
Database country/region code                            = 86
Database collating sequence                             = UNIQUE
Alternate collating sequence              (ALT_COLLATE) =
Database page size                                      = 4096

Dynamic SQL Query management           (DYN_QUERY_MGMT) = DISABLE

Discovery support for this database       (DISCOVER_DB) = ENABLE

Restrict access                                         = NO
Default query optimization class         (DFT_QUERYOPT) = 5
Degree of parallelism                      (DFT_DEGREE) = 1
Continue upon arithmetic exceptions   (DFT_SQLMATHWARN) = NO
Default refresh age                   (DFT_REFRESH_AGE) = 0
Default maintained table types for opt (DFT_MTTB_TYPES) = SYSTEM
Number of frequent values retained     (NUM_FREQVALUES) = 10
Number of quantiles retained            (NUM_QUANTILES) = 20

Backup pending                                          = NO

Database is consistent                                  = NO
Rollforward pending                                     = NO
Restore pending                                         = NO

Multi-page file allocation enabled                      = YES

Log retain for recovery status                          = NO
User exit for logging status                            = YES

Self tuning memory                    (SELF_TUNING_MEM) = ON
Size of database shared memory (4KB)  (DATABASE_MEMORY) = AUTOMATIC
Database memory threshold               (DB_MEM_THRESH) = 10
Max storage for lock list (4KB)              (LOCKLIST) = 500000
Percent. of lock lists per application       (MAXLOCKS) = 60
Package cache size (4KB)                   (PCKCACHESZ) = AUTOMATIC
Sort heap thres for shared sorts (4KB) (SHEAPTHRES_SHR) = 80000
Sort list heap (4KB)                         (SORTHEAP) = 40000

Database heap (4KB)                            (DBHEAP) = 16384
Catalog cache size (4KB)              (CATALOGCACHE_SZ) = 32768
Log buffer size (4KB)                        (LOGBUFSZ) = 1024
Utilities heap size (4KB)                (UTIL_HEAP_SZ) = 90359
Buffer pool size (pages)                     (BUFFPAGE) = 1000
Max size of appl. group mem set (4KB) (APPGROUP_MEM_SZ) = 30000
Percent of mem for appl. group heap   (GROUPHEAP_RATIO) = 70
Max appl. control heap size (4KB)     (APP_CTL_HEAP_SZ) = 8096

SQL statement heap (4KB)                     (STMTHEAP) = 40000
Default application heap (4KB)             (APPLHEAPSZ) = 60000
Statistics heap size (4KB)               (STAT_HEAP_SZ) = 16384

Interval for checking deadlock (ms)         (DLCHKTIME) = 10000
Lock timeout (sec)                        (LOCKTIMEOUT) = 60

Changed pages threshold                (CHNGPGS_THRESH) = 80
Number of asynchronous page cleaners   (NUM_IOCLEANERS) = AUTOMATIC
Number of I/O servers                   (NUM_IOSERVERS) = AUTOMATIC
Index sort flag                             (INDEXSORT) = YES
Sequential detect flag                      (SEQDETECT) = YES
Default prefetch size (pages)         (DFT_PREFETCH_SZ) = AUTOMATIC

Track modified pages                         (TRACKMOD) = ON

Default number of containers                            = 1
Default tablespace extentsize (pages)   (DFT_EXTENT_SZ) = 32

Max number of active applications            (MAXAPPLS) = AUTOMATIC
Average number of active applications       (AVG_APPLS) = AUTOMATIC
Max DB files open per application            (MAXFILOP) = 384

Log file size (4KB)                         (LOGFILSIZ) = 10240
Number of primary log files                (LOGPRIMARY) = 100
Number of secondary log files               (LOGSECOND) = 100
Changed path to log files                  (NEWLOGPATH) =
Path to log files                                       = /db2homejt/database/PJT/pjt/NODE0000/SQL00001/SQLOGDIR/
Overflow log path                     (OVERFLOWLOGPATH) =
Mirror log path                         (MIRRORLOGPATH) =
First active log file                                   = S0119914.LOG
Block log on disk full                (BLK_LOG_DSK_FUL) = NO
Percent max primary log space by transaction  (MAX_LOG) = 0
Num. of active log files for 1 active UOW(NUM_LOG_SPAN) = 0

Group commit count                          (MINCOMMIT) = 1
Percent log file reclaimed before soft chckpt (SOFTMAX) = 520
Log retain for recovery enabled             (LOGRETAIN) = OFF
User exit for logging enabled                (USEREXIT) = OFF

HADR database role                                      = STANDARD
HADR local host name                  (HADR_LOCAL_HOST) =
HADR local service name                (HADR_LOCAL_SVC) =
HADR remote host name                (HADR_REMOTE_HOST) =
HADR remote service name              (HADR_REMOTE_SVC) =
HADR instance name of remote server  (HADR_REMOTE_INST) =
HADR timeout value                       (HADR_TIMEOUT) = 120
HADR log write synchronization mode     (HADR_SYNCMODE) = NEARSYNC

First log archive method                 (LOGARCHMETH1) = DISK:/db2homejt/data/dbbak/arch/pjt/
Options for logarchmeth1                  (LOGARCHOPT1) =
Second log archive method                (LOGARCHMETH2) = OFF
Options for logarchmeth2                  (LOGARCHOPT2) =
Failover log archive path                (FAILARCHPATH) =
Number of log archive retries on error   (NUMARCHRETRY) = 5
Log archive retry Delay (secs)         (ARCHRETRYDELAY) = 20
Vendor options                              (VENDOROPT) =

Auto restart enabled                      (AUTORESTART) = ON
Index re-creation time and redo index build  (INDEXREC) = SYSTEM (RESTART)
Log pages during index build            (LOGINDEXBUILD) = OFF
Default number of loadrec sessions    (DFT_LOADREC_SES) = 1
Number of database backups to retain   (NUM_DB_BACKUPS) = 12
Recovery history retention (days)     (REC_HIS_RETENTN) = 366收起
互联网服务 · 2014-08-20
浏览2636
wonder_191wonder_191数据库运维工程师北京融海数据科技股份有限公司
回复 7# zgrrzg22 32374784 memory pages             31192614 lruable pages             10809651 free pages               ...显示全部
回复 7# zgrrzg22

32374784 memory pages
             31192614 lruable pages
             10809651 free pages
                    8 memory pools
              4070093 pinned pages
                 80.0 maxpin percentage
                  5.0 minperm percentage
                 10.0 maxperm percentage
                  8.1 numperm percentage
              2535280 file pages
                  0.0 compressed percentage
                    0 compressed pages
                  8.1 numclient percentage
                 10.0 maxclient percentage
              2535280 client pages
                    0 remote pageouts scheduled
                  875 pending disk I/Os blocked with no pbuf
              4468517 paging space I/Os blocked with no psbuf
                 2228 filesystem I/Os blocked with no fsbuf
                 2689 client filesystem I/Os blocked with no fsbuf
               277800 external pager filesystem I/Os blocked with no fsbuf
                    0 Virtualized Partition Memory Page Faults
                 0.00 Time resolving virtualized partition memory page faults收起
互联网服务 · 2014-08-20
浏览2923
wonder_191wonder_191数据库运维工程师北京融海数据科技股份有限公司
回复 9# zss0109211    Soft data resource limit为251657728Requested size请求了150802432Current set size当前值8650752貌似不是limit限制的问题吧,只不过不知道怎么上调Current set size显示全部
回复 9# zss0109211


   Soft data resource limit为251657728
Requested size请求了150802432

Current set size当前值8650752


貌似不是limit限制的问题吧,只不过不知道怎么上调Current set size收起
互联网服务 · 2014-08-20
浏览2806
zss0109211zss0109211数据库管理员null
这个很明显的 data limit,调整data limit 为unlimit显示全部
这个很明显的 data limit,调整data limit 为unlimit收起
互联网服务 · 2014-08-19
浏览2887
zss0109211zss0109211数据库管理员null
MESSAGE : Private memory and/or virtual address space exhausted, or data ulimit           exceededDATA #1 : Soft data resource limit, PD_TYPE_RLIM_DATA_CUR, 8 bytes251657728DATA #2 : Requested size, PD_TYPE_MEM_REQUESTED...显示全部
MESSAGE : Private memory and/or virtual address space exhausted, or data ulimit
          exceeded
DATA #1 : Soft data resource limit, PD_TYPE_RLIM_DATA_CUR, 8 bytes
251657728
DATA #2 : Requested size, PD_TYPE_MEM_REQUESTED_SIZE, 8 bytes
150802432
DATA #3 : Current set size, PD_TYPE_SET_SIZE, 8 bytes
8650752收起
互联网服务 · 2014-08-19
浏览2838
zgrrzg22zgrrzg22其它CTTQ
1、maxclient% maxperm%参数2、db2 get db cfg / db2 get dbm cfg贴上来看看.显示全部
1、maxclient% maxperm%参数
2、db2 get db cfg / db2 get dbm cfg

贴上来看看.收起
互联网服务 · 2014-08-19
浏览2898
wangyaxwangyax软件开发工程师金融机构
回复 5# wonder_191 首先这是一个warning,应该是申请隐藏内存时不足造成的,你忽略它也是无所谓。其次,系统好像有100多G内存,数据库只有40G,是不是也可以相应调整再次,warning中ulimit 报data file不足,你调大一点也没有关系,这个参数我们都是设置unlimited。...显示全部
回复 5# wonder_191

首先这是一个warning,应该是申请隐藏内存时不足造成的,你忽略它也是无所谓。

其次,系统好像有100多G内存,数据库只有40G,是不是也可以相应调整

再次,warning中ulimit 报data file不足,你调大一点也没有关系,这个参数我们都是设置unlimited。收起
互联网服务 · 2014-08-18
浏览2859
wonder_191wonder_191数据库运维工程师北京融海数据科技股份有限公司
回复 3# wangyax    有什么根据吗,生产系统,不敢乱调啊显示全部
回复 3# wangyax


   有什么根据吗,生产系统,不敢乱调啊收起
互联网服务 · 2014-08-18
浏览2895
wonder_191wonder_191数据库运维工程师北京融海数据科技股份有限公司
回复 2# 繁华如梦    vmstat的同时执行db2 "select * from sysibmadm.snapdyn_sql"System configuration: lcpu=32 mem=126464MB kthr          memory                ...显示全部
回复 2# 繁华如梦


   vmstat的同时执行db2 "select * from sysibmadm.snapdyn_sql"

System configuration: lcpu=32 mem=126464MB

kthr          memory                         page                       faults           cpu   
------- --------------------- ------------------------------------ ------------------ -----------
  r   b        avm        fre    re    pi    po    fr     sr    cy    in     sy    cs us sy id wa
  2   0   24852159   10022899     0     0     0     0      0     0  3165  49302  6198  8  2 75 15
  2   0   24852972   10022044     0     0     0     0      0     0  2629 113281  6614 21  1 63 15
  7   0   24852980   10022030     0     0     0     0      0     0  2630  45932  6382 11  1 72 15
  7   0   24855077   10019926     0     0     0     0      0     0  3084  48631 16481 23  2 63 12
  5   0   24856185   10018808     0     0     0     0      0     0  3609  82282  7758 20  2 60 18
  3   0   24856186   10018804     0     0     0     0      0     0  3469  57218  5890  8  1 72 18
  4   0   24856814   10018165     0     0     0     0      0     0  3592  63775  7928 13  7 64 15



$ db2mtrk -i -d -v
Tracking Memory on: 2014/08/18 at 15:44:38

Memory for instance

   Database Monitor Heap is of size 589824 bytes
   Other Memory is of size 14221312 bytes
   Total: 14811136 bytes

Memory for database: PJT     

   Backup/Restore/Util Heap is of size 327680 bytes
   Package Cache is of size 2355691520 bytes
   Catalog Cache Heap is of size 23789568 bytes
   Buffer Pool Heap (3) is of size 23058710528 bytes
   Buffer Pool Heap (2) is of size 11182735360 bytes
   Buffer Pool Heap (1) is of size 2795765760 bytes
   Buffer Pool Heap (System 32k buffer pool) is of size 1114112 bytes
   Buffer Pool Heap (System 16k buffer pool) is of size 851968 bytes
   Buffer Pool Heap (System 8k buffer pool) is of size 720896 bytes
   Buffer Pool Heap (System 4k buffer pool) is of size 655360 bytes
   Shared Sort Heap is of size 29163520 bytes
   Lock Manager Heap is of size 2248015872 bytes
   Database Heap is of size 25100288 bytes
   Other Memory is of size 196608 bytes
   Total: 41722839040 bytes收起
互联网服务 · 2014-08-18
浏览3375

提问者

wonder_191
数据库运维工程师北京融海数据科技股份有限公司

相关问题

问题状态

  • 发布时间:2014-08-18
  • 关注会员:1 人
  • 问题浏览:14701
  • 最近回答:2014-08-20
  • X社区推广