Skip to content

Configure global lock settings and OSGi plugin resource limits - #2281

Open
tushar2682 wants to merge 1 commit into
killbill:masterfrom
tushar2682:fix/distributed-locking-config
Open

Configure global lock settings and OSGi plugin resource limits#2281
tushar2682 wants to merge 1 commit into
killbill:masterfrom
tushar2682:fix/distributed-locking-config

Conversation

@tushar2682

Copy link
Copy Markdown

Overview

This PR introduces explicit configurations for global distributed locking and OSGi database connection pooling. These changes improve concurrency handling under heavy billing workloads, protect the core application from database connection exhaustion, and strengthen plugin security.

Fixes/Refers to: #2280


Changes

Global Distributed Locking

  • Configured org.killbill.rescheduleIntervalOnLock to:

    10s,30s,1m,2m,5m,10m
    

    to reduce the initial retry intervals for tasks blocked on distributed locks.

  • Increased the maximum lock retry attempts by setting:

    • org.killbill.invoice.globalLock.retries=100
    • org.killbill.payment.globalLock.retries=100

    This helps prevent premature failures during concurrent operations on the same account.

OSGi Plugin Database Resource Isolation

Configured dedicated connection pool settings for OSGi plugin data sources to isolate plugin database usage from the core application:

  • Connection timeout: 10 seconds
  • Maximum pool size: 10

These limits help prevent slow or leaking plugins from exhausting the main database connection pool.

Security

Explicitly disabled authentication bypass for plugins invoking core APIs by setting:

org.killbill.security.skipAuthForPlugins=false

This ensures that all plugin requests to core APIs are authenticated according to the configured security policies.


Benefits

  • Improved resilience under high-concurrency billing workloads.
  • Reduced risk of failures caused by distributed lock contention.
  • Better isolation of plugin database resources from the core application.
  • Protection against database connection pool exhaustion.
  • Stronger security by enforcing authentication for plugin-to-core API communication.

@tushar2682
tushar2682 force-pushed the fix/distributed-locking-config branch from 95b27c8 to 131cb35 Compare July 23, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant