snow-flow 4.6.1 → 4.6.2
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.
|
@@ -16,18 +16,13 @@ class MCPProcessManager {
|
|
|
16
16
|
// INCREASED LIMITS TO PREVENT AGGRESSIVE CLEANUP
|
|
17
17
|
this.MAX_MCP_SERVERS = parseInt(process.env.SNOW_MAX_MCP_SERVERS || '30'); // Increased from 10
|
|
18
18
|
this.MAX_MEMORY_MB = parseInt(process.env.SNOW_MCP_MEMORY_LIMIT || '3000'); // Increased from 1500
|
|
19
|
-
// DISABLED AUTOMATIC CLEANUP
|
|
20
|
-
this.CLEANUP_ENABLED =
|
|
21
|
-
this.CLEANUP_INTERVAL =
|
|
19
|
+
// PERMANENTLY DISABLED AUTOMATIC CLEANUP FOR PERSISTENT SERVERS
|
|
20
|
+
this.CLEANUP_ENABLED = false; // Permanently disabled - servers should run forever
|
|
21
|
+
this.CLEANUP_INTERVAL = Infinity; // Never cleanup
|
|
22
22
|
this.isCleaningUp = false;
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this.startPeriodicCleanup();
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
logger.info('✅ MCP cleanup is DISABLED for stability');
|
|
30
|
-
}
|
|
23
|
+
// Never start cleanup - servers should be persistent
|
|
24
|
+
logger.info('✅ MCP cleanup is PERMANENTLY DISABLED - servers will run forever');
|
|
25
|
+
logger.info('🔄 MCP servers are now persistent and will not auto-shutdown');
|
|
31
26
|
}
|
|
32
27
|
static getInstance() {
|
|
33
28
|
if (!MCPProcessManager.instance) {
|
|
@@ -16,18 +16,13 @@ class MCPProcessManager {
|
|
|
16
16
|
// INCREASED LIMITS TO PREVENT AGGRESSIVE CLEANUP
|
|
17
17
|
this.MAX_MCP_SERVERS = parseInt(process.env.SNOW_MAX_MCP_SERVERS || '30'); // Increased from 10
|
|
18
18
|
this.MAX_MEMORY_MB = parseInt(process.env.SNOW_MCP_MEMORY_LIMIT || '3000'); // Increased from 1500
|
|
19
|
-
// DISABLED AUTOMATIC CLEANUP
|
|
20
|
-
this.CLEANUP_ENABLED =
|
|
21
|
-
this.CLEANUP_INTERVAL =
|
|
19
|
+
// PERMANENTLY DISABLED AUTOMATIC CLEANUP FOR PERSISTENT SERVERS
|
|
20
|
+
this.CLEANUP_ENABLED = false; // Permanently disabled - servers should run forever
|
|
21
|
+
this.CLEANUP_INTERVAL = Infinity; // Never cleanup
|
|
22
22
|
this.isCleaningUp = false;
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this.startPeriodicCleanup();
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
logger.info('✅ MCP cleanup is DISABLED for stability');
|
|
30
|
-
}
|
|
23
|
+
// Never start cleanup - servers should be persistent
|
|
24
|
+
logger.info('✅ MCP cleanup is PERMANENTLY DISABLED - servers will run forever');
|
|
25
|
+
logger.info('🔄 MCP servers are now persistent and will not auto-shutdown');
|
|
31
26
|
}
|
|
32
27
|
static getInstance() {
|
|
33
28
|
if (!MCPProcessManager.instance) {
|
|
@@ -286,22 +286,11 @@ class MCPServerManager extends events_1.EventEmitter {
|
|
|
286
286
|
return true; // Already stopped
|
|
287
287
|
}
|
|
288
288
|
try {
|
|
289
|
-
//
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
// Force kill if graceful shutdown fails
|
|
295
|
-
if (server.process) {
|
|
296
|
-
try {
|
|
297
|
-
server.process.kill('SIGKILL');
|
|
298
|
-
}
|
|
299
|
-
catch (e) {
|
|
300
|
-
// Process might already be dead
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
resolve(undefined);
|
|
304
|
-
}, 2000); // Reduced from 5000ms to 2000ms to prevent hanging
|
|
289
|
+
// DISABLED AUTOMATIC SHUTDOWN - Servers should run forever
|
|
290
|
+
logger.warn('⚠️ Server shutdown requested but auto-shutdown is DISABLED for persistence');
|
|
291
|
+
logger.info('🔄 MCP servers are configured to run indefinitely');
|
|
292
|
+
// Don't kill the server - let it run forever
|
|
293
|
+
return true;
|
|
305
294
|
server.process?.on('exit', () => {
|
|
306
295
|
clearTimeout(timeout);
|
|
307
296
|
resolve(undefined);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "4.6.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "4.6.2",
|
|
4
|
+
"description": "PERSISTENT MCP SERVERS - v4.6.2 disables automatic MCP server shutdown for persistent operation. Servers now run indefinitely instead of auto-terminating after timeout periods. Fixes MCP server stability issues with permanent server lifecycle.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"bin": {
|