@514labs/moose-lib 0.6.253-ci-5-gc3e56d08 → 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.
package/dist/index.mjs CHANGED
@@ -100,7 +100,17 @@ var init_commons = __esm({
100
100
  username,
101
101
  password,
102
102
  database,
103
- application: "moose"
103
+ application: "moose",
104
+ // Connection pool configuration for high load (100+ concurrent users)
105
+ max_open_connections: 50,
106
+ // Increased from default 10 to handle 100 concurrent users
107
+ request_timeout: 6e4,
108
+ // 60s timeout for HTTP requests (queries and inserts)
109
+ keep_alive: {
110
+ enabled: true,
111
+ idle_socket_ttl: 2e3
112
+ // 2s idle time (lower than default to prevent socket hang-ups)
113
+ }
104
114
  // Note: wait_end_of_query is configured per operation type, not globally
105
115
  // to preserve SELECT query performance while ensuring INSERT/DDL reliability
106
116
  });
@@ -2822,7 +2832,21 @@ async function getTemporalClient(temporalUrl, namespace, clientCert, clientKey,
2822
2832
  );
2823
2833
  let connectionOptions = {
2824
2834
  address: temporalUrl,
2825
- connectTimeout: "3s"
2835
+ connectTimeout: "30s",
2836
+ // Increased from 3s to handle high load
2837
+ // Add gRPC keepalive to prevent connection drops
2838
+ channelArgs: {
2839
+ "grpc.keepalive_time_ms": 3e4,
2840
+ // Send keepalive every 30s
2841
+ "grpc.keepalive_timeout_ms": 15e3,
2842
+ // Wait 15s for keepalive response
2843
+ "grpc.keepalive_permit_without_calls": 1,
2844
+ // Allow keepalive without active calls
2845
+ "grpc.http2.max_pings_without_data": 0,
2846
+ // No limit on pings without data
2847
+ "grpc.http2.min_time_between_pings_ms": 1e4
2848
+ // Min 10s between pings
2849
+ }
2826
2850
  };
2827
2851
  if (clientCert && clientKey) {
2828
2852
  console.log("Using TLS for secure Temporal");