Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

At the platform level, Joget Workflow has been tested to ensure that there are no leaks in memory or database connections and other resources. However, for custom scripts and plugins, etc, developers will need to ensure that database connections and other resources are properly released after being used (i.e. using a try-catch-finally block). Improper management of resources will lead to eventual exhaustion of resources, causing the system to become unresponsive or appear to hang.

Thai

ในระดับแพลตฟอร์ม Joget Workflow ได้รับการทดสอบเพื่อให้แน่ใจว่าไม่มีการรั่วไหลในหน่วยความจำหรือการเชื่อมต่อฐานข้อมูลและทรัพยากรอื่น ๆ อย่างไรก็ตามสำหรับสคริปต์และปลั๊กอินที่กำหนดเอง ฯลฯ นักพัฒนาจะต้องตรวจสอบให้แน่ใจว่าการเชื่อมต่อฐานข้อมูลและทรัพยากรอื่น ๆ ได้รับการเผยแพร่อย่างถูกต้องหลังจากใช้งาน (เช่นใช้บล็อก try-catch-สุดท้าย) การจัดการทรัพยากรที่ไม่เหมาะสมจะนำไปสู่การหมดทรัพยากรในที่สุดทำให้ระบบไม่ตอบสนองหรือดูเหมือนค้าง

Platform Datasource Monitoring

Thai

การตรวจสอบแหล่งข้อมูลแพลตฟอร์ม

In v6, a new feature incorporated into the Performance Analyzer now provides monitoring of database connections at runtime, with warnings of possible database connection leaks.

Thai

ใน v6 คุณลักษณะใหม่ที่รวมอยู่ในPerformance Analyzer ตอนนี้จัดเตรียมการมอนิเตอร์การเชื่อมต่อฐานข้อมูลที่รันไทม์พร้อมคำเตือนของการรั่วไหลของการเชื่อมต่อฐานข้อมูลที่เป็นไปได้

When logged in as an administrator, the Performance Analyzer displays the number of active and idle platform datasource connections at the top left corner of the app userview.

Thai

เมื่อล็อกอินในฐานะผู้ดูแลระบบ Performance Analyzer จะแสดงจำนวนการเชื่อมต่อแหล่งข้อมูลที่ใช้งานและไม่ได้ใช้งานแพลตฟอร์มที่มุมซ้ายบนของแอป userview


In a stable environment, the number of active and idle connections will increase when load increases, and reduce accordingly once connections are released. When connections are not being released properly the number of connections will keep increasing without reducing, which would give an indication of possible connection leaks.

Thai

ในสภาพแวดล้อมที่มั่นคงจำนวนการเชื่อมต่อที่ใช้งานและไม่ได้ใช้งานจะเพิ่มขึ้นเมื่อโหลดเพิ่มขึ้นและลดลงตามลำดับเมื่อปล่อยการเชื่อมต่อ เมื่อการเชื่อมต่อไม่ได้รับการปล่อยอย่างถูกต้องจำนวนการเชื่อมต่อจะเพิ่มขึ้นเรื่อย ๆ โดยไม่ลดขนาดซึ่งจะบ่งบอกถึงการรั่วไหลของการเชื่อมต่อที่เป็นไปได้


Connection Leak Detection in Custom JDBC Code

Thai

การตรวจหารอยรั่วของการเชื่อมต่อในรหัส JDBC ที่กำหนดเอง

This connection monitoring keeps track of the platform datasource. However, there are also many cases where custom JDBC code in BeanShell scripts or custom plugins do not use the platform datasource, and utilize their own JDBC connections. To cater for this, there is a warning mechanism that checks for potential unclosed JDBC connections that may cause leaks. This detection works for both BeanShell and custom plugin code. When a possible leak is detected, a warning will be captured in the platform log file, e.g.

Thai

การตรวจสอบการเชื่อมต่อนี้จะติดตามแหล่งข้อมูลของแพลตฟอร์ม อย่างไรก็ตามมีหลายกรณีที่รหัส JDBC ที่กำหนดเองในสคริปต์ BeanShell หรือปลั๊กอินที่กำหนดเองไม่ได้ใช้แหล่งข้อมูลของแพลตฟอร์มและใช้การเชื่อมต่อ JDBC ของตนเอง เพื่อรองรับสิ่งนี้มีกลไกเตือนที่ตรวจสอบการเชื่อมต่อ JDBC ที่ไม่เป็นไปได้ที่อาจเกิดการรั่วไหล การตรวจจับนี้ใช้ได้กับทั้ง BeanShell และรหัสปลั๊กอินที่กำหนดเอง เมื่อตรวจพบการรั่วไหลที่เป็นไปได้คำเตือนจะถูกบันทึกไว้ในไฟล์บันทึกแพลตฟอร์มเช่น

Code Block
WARN  22 Aug 2016 12:06:10 org.joget.commons.util.Analyzer  - Possible unclosed DB connections: 4; URL: /jw/web/userview/dbtest/v/_/form1_crud

The warning includes the URL path, so this allows administrators to identify the page causing the problem.

Thai

คำเตือนรวมถึงเส้นทาง URL เพื่อให้ผู้ดูแลระบบระบุหน้าเว็บที่ทำให้เกิดปัญหา


Warning

Please note that the leak detection may not work 100% as there are many variations in which custom code may cause connection leaks, but it should help to detect problems in most common JDBC code.

Thai

โปรดทราบว่าการตรวจจับการรั่วไหลอาจไม่ทำงาน 100% เนื่องจากมีการเปลี่ยนแปลงหลายอย่างซึ่งรหัสที่กำหนดเองอาจทำให้เกิดการรั่วไหลของการเชื่อมต่อ แต่ควรช่วยตรวจจับปัญหาในรหัส JDBC ทั่วไป

Related Tutorials

Thai

บทแนะนำที่เกี่ยวข้อง