freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

was宕機(jī)常見問題及參考解決方案(已修改)

2025-06-17 19:42 本頁面
 

【正文】 WAS宕機(jī)問題總結(jié)起來有以下幾類:一、線程掛起導(dǎo)致線程池滿(Thread Hang):Hangs refer to the JVM locking up or refusing to respond.A hang can occur when:1)Your application entered an wait leak2)Excessive Synchronization cause performance problems3)A deadlock has occurred收集日志:生成JAVA CORE分析工具:IBM Thread and Monitor Dump Analyzer線程等待泄漏(Wait Leaks)常見的情況就是,有很多線程使用wait()方法,等待被喚醒notify()。但是,存在某一個線程獲取到鎖并且進(jìn)行業(yè)務(wù)處理完成后,忘記去喚醒等待執(zhí)行的進(jìn)程。這樣導(dǎo)致的等待泄漏,從而線程掛起。When you use the wait/notify mechanism, you typically have one or more threads blocked in the wait() call, waiting to be notified. The notifying thread is supposed to call notify() or notifyAll() to signal that waiting threads can wake up and carry on processing.A problmatic situation could occur that the notify() call is invoked before the threads go into the wait() method. In this case, the waiting threads would not be notified anymore and bee stuck. So, do not forget to notify the waiting theads in you application and maks sure that the Notify action is performed after all the waiting threads are started. 應(yīng)對策略:notify必須發(fā)生在所有wait之前。同步過度(Excessive Synchronization)LIS系統(tǒng)FORMULA ONE報表打印就是采用了SYNCHRONIZE思想,如果有某一個大的報表長時間打不出來的話,會導(dǎo)致其它所有的報表打印線程全部掛起。Synchronization is required for protecting some critical resources, but if large sections of code are synchronized, an application effectively will bee single threaded, and the throughput will decrease dramatically. To improve the performance, you should think about:1) Use other efficient algorithm to replace the monitor/lock?2) Try to keep the monitor lock for a short time?3) Reduce the number of threads using this monitor/lock?應(yīng)對策略:改變程序?qū)崿F(xiàn)算法,避免占用鎖時間過長。比如設(shè)置多個鎖或者提高同步代碼塊的執(zhí)行效率。資源搶占死鎖(Dead Lock)線程運行需要獲取到兩個資源,當(dāng)線程1獲取到資源A,線程2獲取到資源B,此時,線程1需要再獲取資源B,線程2需要再獲取資源A。這就形成了資源循環(huán)申請的一個死鎖。其它想獲取到資源A或者資源B的線程必將都會掛起。In this case, a thread acquires the lock on lock1, At the same time, another thread acquires the lock on lock2. so the threa
點擊復(fù)制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫吧 www.dybbs8.com
公安備案圖鄂ICP備17016276號-1