@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.
@@ -51,7 +51,17 @@ var init_commons = __esm({
51
51
  username,
52
52
  password,
53
53
  database,
54
- application: "moose"
54
+ application: "moose",
55
+ // Connection pool configuration for high load (100+ concurrent users)
56
+ max_open_connections: 50,
57
+ // Increased from default 10 to handle 100 concurrent users
58
+ request_timeout: 6e4,
59
+ // 60s timeout for HTTP requests (queries and inserts)
60
+ keep_alive: {
61
+ enabled: true,
62
+ idle_socket_ttl: 2e3
63
+ // 2s idle time (lower than default to prevent socket hang-ups)
64
+ }
55
65
  // Note: wait_end_of_query is configured per operation type, not globally
56
66
  // to preserve SELECT query performance while ensuring INSERT/DDL reliability
57
67
  });
@@ -440,7 +450,21 @@ async function getTemporalClient(temporalUrl, namespace, clientCert, clientKey,
440
450
  );
441
451
  let connectionOptions = {
442
452
  address: temporalUrl,
443
- connectTimeout: "3s"
453
+ connectTimeout: "30s",
454
+ // Increased from 3s to handle high load
455
+ // Add gRPC keepalive to prevent connection drops
456
+ channelArgs: {
457
+ "grpc.keepalive_time_ms": 3e4,
458
+ // Send keepalive every 30s
459
+ "grpc.keepalive_timeout_ms": 15e3,
460
+ // Wait 15s for keepalive response
461
+ "grpc.keepalive_permit_without_calls": 1,
462
+ // Allow keepalive without active calls
463
+ "grpc.http2.max_pings_without_data": 0,
464
+ // No limit on pings without data
465
+ "grpc.http2.min_time_between_pings_ms": 1e4
466
+ // Min 10s between pings
467
+ }
444
468
  };
445
469
  if (clientCert && clientKey) {
446
470
  console.log("Using TLS for secure Temporal");
@@ -2655,7 +2679,22 @@ async function createTemporalConnection(logger2, temporalConfig) {
2655
2679
  `<workflow> Using temporal_url: ${temporalConfig.url} and namespace: ${temporalConfig.namespace}`
2656
2680
  );
2657
2681
  let connectionOptions = {
2658
- address: temporalConfig.url
2682
+ address: temporalConfig.url,
2683
+ connectTimeout: 3e4,
2684
+ // 30s connection timeout
2685
+ // Add gRPC keepalive for worker stability
2686
+ channelArgs: {
2687
+ "grpc.keepalive_time_ms": 3e4,
2688
+ // Send keepalive every 30s
2689
+ "grpc.keepalive_timeout_ms": 15e3,
2690
+ // Wait 15s for keepalive response
2691
+ "grpc.keepalive_permit_without_calls": 1,
2692
+ // Allow keepalive without active calls
2693
+ "grpc.http2.max_pings_without_data": 0,
2694
+ // No limit on pings without data
2695
+ "grpc.http2.min_time_between_pings_ms": 1e4
2696
+ // Min 10s between pings
2697
+ }
2659
2698
  };
2660
2699
  if (temporalConfig.clientCert && temporalConfig.clientKey) {
2661
2700
  logger2.info("Using TLS for secure Temporal");