انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهMID-017-L04

المهلات وكشف التسرّب

  • الدرس 4 من 5
  • Mid-level
في هذا الدرس 4 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

configure timeouts that fail fast, and find leaks.

الموضوعات المخطط لها

  • connectionTimeout: how long a thread waits for a connection (a few seconds, not 30 s default for APIs; verify default).
  • Database side: statement_timeout, lock_timeout, idle_in_transaction_session_timeout.
  • A leak is a borrowed connection never returned; leakDetectionThreshold logs a stack trace when one is held too long.
  • Pool exhaustion signs: threads blocked in HikariPool.getConnection in thread dumps, pending threads metric above zero.
  • Do not hold a connection across remote calls; spring.jpa.open-in-view can hold one for a whole request (consider turning it off).
تفاصيل المخطط المبدئي

عرض عملي

a thread dump excerpt with many threads waiting in HikariPool.getConnection.

اختبر فهمك

What does leakDetectionThreshold report?

أظهر الإجابة

A stack trace for connections held longer than the threshold.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.