@514labs/moose-lib 0.6.253-ci-8-g891f768b → 0.6.253-ci-3-gb5916f32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,7 +67,17 @@ var init_commons = __esm({
67
67
  username,
68
68
  password,
69
69
  database,
70
- application: "moose"
70
+ application: "moose",
71
+ // Connection pool configuration for high load (100+ concurrent users)
72
+ max_open_connections: 50,
73
+ // Increased from default 10 to handle 100 concurrent users
74
+ request_timeout: 6e4,
75
+ // 60s timeout for HTTP requests (queries and inserts)
76
+ keep_alive: {
77
+ enabled: true,
78
+ idle_socket_ttl: 2e3
79
+ // 2s idle time (lower than default to prevent socket hang-ups)
80
+ }
71
81
  // Note: wait_end_of_query is configured per operation type, not globally
72
82
  // to preserve SELECT query performance while ensuring INSERT/DDL reliability
73
83
  });
@@ -453,7 +463,21 @@ async function getTemporalClient(temporalUrl, namespace, clientCert, clientKey,
453
463
  );
454
464
  let connectionOptions = {
455
465
  address: temporalUrl,
456
- connectTimeout: "3s"
466
+ connectTimeout: "30s",
467
+ // Increased from 3s to handle high load
468
+ // Add gRPC keepalive to prevent connection drops
469
+ channelArgs: {
470
+ "grpc.keepalive_time_ms": 3e4,
471
+ // Send keepalive every 30s
472
+ "grpc.keepalive_timeout_ms": 15e3,
473
+ // Wait 15s for keepalive response
474
+ "grpc.keepalive_permit_without_calls": 1,
475
+ // Allow keepalive without active calls
476
+ "grpc.http2.max_pings_without_data": 0,
477
+ // No limit on pings without data
478
+ "grpc.http2.min_time_between_pings_ms": 1e4
479
+ // Min 10s between pings
480
+ }
457
481
  };
458
482
  if (clientCert && clientKey) {
459
483
  console.log("Using TLS for secure Temporal");
@@ -2660,7 +2684,22 @@ async function createTemporalConnection(logger2, temporalConfig) {
2660
2684
  `<workflow> Using temporal_url: ${temporalConfig.url} and namespace: ${temporalConfig.namespace}`
2661
2685
  );
2662
2686
  let connectionOptions = {
2663
- address: temporalConfig.url
2687
+ address: temporalConfig.url,
2688
+ connectTimeout: 3e4,
2689
+ // 30s connection timeout
2690
+ // Add gRPC keepalive for worker stability
2691
+ channelArgs: {
2692
+ "grpc.keepalive_time_ms": 3e4,
2693
+ // Send keepalive every 30s
2694
+ "grpc.keepalive_timeout_ms": 15e3,
2695
+ // Wait 15s for keepalive response
2696
+ "grpc.keepalive_permit_without_calls": 1,
2697
+ // Allow keepalive without active calls
2698
+ "grpc.http2.max_pings_without_data": 0,
2699
+ // No limit on pings without data
2700
+ "grpc.http2.min_time_between_pings_ms": 1e4
2701
+ // Min 10s between pings
2702
+ }
2664
2703
  };
2665
2704
  if (temporalConfig.clientCert && temporalConfig.clientKey) {
2666
2705
  logger2.info("Using TLS for secure Temporal");