@@ -14,7 +14,7 @@ import { waitUntilConnected } from "@cocalc/nats/util";
14
14
import { delay } from "awaiting" ;
15
15
import { getMaxPayload } from "@cocalc/nats/util" ;
16
16
17
- export const DEFAULT_LIFETIME = 2 * 1000 * 60 ;
17
+ export const DEFAULT_LIFETIME = 1000 * 60 ;
18
18
export const MAX_LIFETIME = 15 * 1000 * 60 ;
19
19
export const MIN_LIFETIME = 30 * 1000 ;
20
20
export const MIN_HEARTBEAT = 5000 ;
@@ -240,8 +240,15 @@ async function handleMessage(mesg, db) {
240
240
} ;
241
241
242
242
if ( numChangefeedsPerAccount [ account_id ] > MAX_CHANGEFEEDS_PER_ACCOUNT ) {
243
+ logger . debug (
244
+ `numChangefeedsPerAccount[${ account_id } ] >= MAX_CHANGEFEEDS_PER_ACCOUNT` ,
245
+ {
246
+ numChangefeedsPerAccountThis : numChangefeedsPerAccount [ account_id ] ,
247
+ MAX_CHANGEFEEDS_PER_ACCOUNT ,
248
+ } ,
249
+ ) ;
243
250
respond (
244
- `There is a limit of ${ MAX_CHANGEFEEDS_PER_ACCOUNT } changefeeds per account` ,
251
+ `This server has a limit of ${ MAX_CHANGEFEEDS_PER_ACCOUNT } changefeeds per account` ,
245
252
) ;
246
253
return ;
247
254
}
@@ -253,7 +260,7 @@ async function handleMessage(mesg, db) {
253
260
// this will just cause the client to make another attempt, hopefully
254
261
// to another server
255
262
respond (
256
- `There is a limit of ${ MAX_CHANGEFEEDS_PER_SERVER } changefeeds per server ` ,
263
+ `This server has a limit of ${ MAX_CHANGEFEEDS_PER_SERVER } changefeeds` ,
257
264
) ;
258
265
return ;
259
266
}
0 commit comments