Skip to content

Commit aba8939

Browse files
authored
fix(slack): bump command processor memory to 512 MB (#233)
Closes #231. The command processor was running at the CDK default of 128 MB and OOMing during module init. Symptom: @bgagent mentions in Slack got the 👀 reaction (receiver acked the event) but never the follow-up acknowledgement — the processor crashed before doing anything. CloudWatch logs: INIT_REPORT ... Phase: init Status: error Error Type: Runtime.OutOfMemory REPORT ... Memory Size: 128 MB Max Memory Used: 127 MB Cause: createTaskCore's transitive dependency graph (Cedar engine, attachment-screening, related deps) grew past the 128 MB module-init ceiling. The Slack processor imports createTaskCore so it loads the whole graph even on hot paths that never use attachments. The Linear webhook processor hit the same pattern earlier and was bumped in d843540. Slack's processor was never explicitly sized so it stayed at the default until the bundle finally crossed 128 MB. Followup #232 tracks the deeper fix (lazy-load attachment/Cedar deps in createTaskCore so processors don't need 512 MB).
1 parent 5c38092 commit aba8939

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cdk/src/constructs/slack-integration.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,17 @@ export class SlackIntegration extends Construct {
238238
}));
239239

240240
// --- Slash Command Processor (async worker) ---
241+
// Memory bumped from default 128 MB → 512 MB after module-init OOM
242+
// surfaced in dev. Bundle grew past the 128 MB cap once createTaskCore's
243+
// transitive dependency graph (Cedar, attachment-screening) imported
244+
// here through the shared task-creation path.
241245
const commandProcessorFn = new lambda.NodejsFunction(this, 'CommandProcessorFn', {
242246
entry: path.join(handlersDir, 'slack-command-processor.ts'),
243247
handler: 'handler',
244248
runtime: Runtime.NODEJS_24_X,
245249
architecture: Architecture.ARM_64,
246250
timeout: Duration.seconds(30),
251+
memorySize: 512,
247252
environment: {
248253
...createTaskEnv,
249254
SLACK_USER_MAPPING_TABLE_NAME: this.userMappingTable.tableName,

0 commit comments

Comments
 (0)