Thread 1 cannot allocate new log
轉Thread 1 cannot allocate new log
2012-03-19 15:12:00| 分類: ORA等錯誤處理 | 標籤: |字號大中小
今天發現alter.log有以下資訊:
Thread 1 cannot allocate new log, sequence 6166
Private strand flush not complete
對於這個錯誤資訊得解釋如下:
當系統要重新利用某個日誌檔案的時候,系統需要將該日誌檔案所包括的buffer cache 中的dirty block 寫到相應的資料檔案。由於對於一個資料庫操作而言,它可能產生的redo 量僅僅是幾十位元組,但是對於buffer cache中確是一個block (一般為8k)。所以,對於一個僅僅是幾百M的日誌檔案,它所保護的buffer cache 可能是幾個G
一旦發生"Thread 1 cannot allocate new log",表明系統的checkpoint 沒有來得及完成,也就是說 buffer cache 中的dirty data還沒有完全寫到資料檔案,就已經有大量的日誌需要寫入到系統。而系統只能通知應用:checkpoint 還沒有完成,你只能等待。這個時候,系統就基本處於hang 狀態了 When the database waits on checkpoints,redo generation is stopped until the log switch is done
如果,我們在這個時候檢視系統資訊,就會發現:v$log中的日誌狀態大多處於active 狀態; v$session_wait 中會有很多log file switch 事件的發生
解決辦法: a. 新增更多的日誌檔案 b. 加大checkpoint 觸發的頻度 c. 減小redo log 的size d. 提高DBWR的效率 e. 為了更好的瞭解系統的執行,可以設定
log_checkpoint_interval = 0
log_checkpoint_timeout = 0
log_checkpoints_to_alert=True
9i以後可能大家都喜歡透過設定fast_start_mttr_target來控制instance
recovery的粒度。但是仍然有兩個引數一直影響著我們的checkpoint,就是他們:
log_checkpoint_interval
Oracle8.1版本後log_checkpoint_interval指的是兩次checkpoint之間作業系統資料塊的個數。checkpoint時Oracle把記憶體裡修改過的資料塊用DBWR寫到物理檔案,用LGWR寫到日誌和控制檔案(在8i的時候lgwr程式在兼有ckpt程式的作用,呵呵。為了減輕我們本來就可能在高壓情況下疲於奔命的LGWR兄弟的負擔,Oracle引入了ckpt來更新我們的控制檔案和資料檔案頭的SCN資訊)。
一般UNIX作業系統的資料塊為512bytes。
從效能最佳化的角度來說,建議log_checkpoint_interval=redologfilesizebytes
/ 512bytes,根據我們的online redo file的大小來指定我們資料塊的個數.
from
concept:
LOG_CHECKPOINT_INTERVAL specifies the frequency of
checkpoints(用來指定檢查點發生的頻率) in terms of the number of redo log file blocks that
can exist between an incremental checkpoint and the last block written to the
redo log. This number refers to physical operating system blocks, not database
blocks.
Regardless of this value, a checkpoint always occurs when switching
from one online redo log file to another. Therefore, if the value exceeds the
actual redo log file size, checkpoints occur only when switching logs.
Checkpoint frequency is one of the factors that influence the time
required for the database to recover from an unexpected
failure.
log_checkpoint_timeout
Oracle8.1版本後log_checkpoint_timeout指的是兩次checkpoint之間時間秒數(單位是秒)。
Oracle建議不用這個引數來控制,因為事務(transaction)大小不是按時間等量分佈的(事務的長短並不是最重要的,重要的是我們的業務邏輯和資料的完整性)。那麼我們用log_checkpoint_interval引數控制會更好一些。
我們可以透過log_checkpoint_timeout=0來禁用此引數或者按預設的900。
LOG_CHECKPOINT_TIMEOUT
specifies (in seconds) the amount of time that has passed since the incremental
checkpoint at the position where the last write to the redo log (sometimes
called the tail of the log) occurred. This parameter also signifies that no
buffer will remain dirty (in the cache) for more than integer
seconds.
Specifying a value of 0 for the timeout disables time-based
checkpoints. Hence, setting the value to 0 is not recommended unless
FAST_START_MTTR_TARGET is set.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27042095/viewspace-750914/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Thread 1 cannot allocate new log,Checkpoint not completethread
- Thread 1 cannot allocate new log, sequence NNN 錯誤thread
- Thread 1 cannot allocate new log 的處理辦法thread
- Thread 1 cannot allocate new log Private strand flush not complete 警告thread
- 【轉】cannot allocate new log
- cannot allocate new log 的解決方法
- Manual Log Switching Causing Cannot Allocate New Log in Alert Log_435887.1
- 【ASK_ORACLE】檢查點錯誤“Cannot allocate new log”和“Checkpoint not complete”Oracle
- fork failed - Cannot allocate memoryAI
- ORA-01623: log is current log for thread - cannot dropthread
- Redis 寫磁碟出錯 Cannot allocate memoryRedis
- redis 寫磁碟出錯Cannot allocate memoryRedis
- Ubuntu Cannot allocate memory 錯誤解決方案Ubuntu
- redis : Can't save in background: fork: Cannot allocate memoryRedis
- VM warning: INFO: OS::commit_memory Cannot allocate memoryMIT
- redolog threadthread
- a new blog
- new Thread與執行緒建立thread執行緒
- 解決Can not allocate log問題的方法
- new Child();new Child(1);
- Exception in thread "main" java.lang.NullPointerException: Cannot invokeExceptionthreadAIJavaNull
- ORA-00322: log 3 of thread 1 is not current copythread
- ORA-16019: cannot use LOG_ARCHIVE_DEST_1 with LOG_ARCHIVE_DESTHive
- Oracle DG 出現 RFS[6]: No standby redo logfiles created for thread 1Oraclethread
- ORA-00392: log 15 of thread 1 is being cleared, operation not allowedthread
- ora-01034 ora-27121 Cannot allocate memory錯誤解決
- 為啥呼叫new Thread().start()方法會呼叫run()方法?thread
- ORA-01618: redo thread 2 is not enabled - cannot mountthread
- ORA-00312: online log 5 thread 1:誤刪standby log 日誌組thread
- cenots7.6系統報“fork:Cannot allocate memory” 報錯的解決方法(實操)
- We Boost the Adoption of New Technology
- ERROR 1135 (HY000): Can't create a new threadErrorthread
- 救命啊java.lang.OutOfMemoryError: unable to create new native threadJavaErrorthread
- ORA-00312: online log 3 thread 1: '/oracle/oradata/hundsun/redo03.log'threadOracle
- Cannot complete applications logonAPPGo
- 課程:A New History for a New China, 1700-2000: New Data and New Methods, Part 1
- Dialogue: New Chapter in the History of ComputingAPT
- java.lang.OutOfMemoryError- unable to create new native thread 問題排查JavaErrorthread