{"record":{"id":"4aaa326e420620c1","repo":"Dokploy/dokploy","slug":"internal-server-error-4aaa32","errorCode":"INTERNAL_SERVER_ERROR","errorMessage":"Error on deploy mongo${error}","messagePattern":"Error on deploy mongo(.+?)","errorType":"exception","errorClass":"TRPCError","httpStatus":500,"severity":"critical","filePath":"packages/server/src/services/mongo.ts","lineNumber":182,"sourceCode":"\t\t\t\t`docker pull ${quote([mongo.dockerImage])}`,\n\t\t\t\tonData,\n\t\t\t);\n\t\t} else {\n\t\t\tawait pullImage(mongo.dockerImage, onData);\n\t\t}\n\n\t\tawait buildMongo(mongo);\n\t\tawait updateMongoById(mongoId, {\n\t\t\tapplicationStatus: \"done\",\n\t\t});\n\t\tonData?.(\"Deployment completed successfully!\");\n\t} catch (error) {\n\t\tonData?.(`Error: ${error}`);\n\t\tawait updateMongoById(mongoId, {\n\t\t\tapplicationStatus: \"error\",\n\t\t});\n\n\t\tthrow new TRPCError({\n\t\t\tcode: \"INTERNAL_SERVER_ERROR\",\n\t\t\tmessage: `Error on deploy mongo${error}`,\n\t\t});\n\t}\n\treturn mongo;\n};\n","sourceCodeStart":164,"sourceCodeEnd":189,"githubUrl":"https://github.com/Dokploy/dokploy/blob/546686ea3587f12ec5652217dedd9f7960fb6d15/packages/server/src/services/mongo.ts#L164-L189","documentation":"Thrown by deployMongo when the deployment pipeline throws: it streams the error via onData, marks the mongo applicationStatus as 'error', then rethrows INTERNAL_SERVER_ERROR with the raw cause appended to the message.","triggerScenarios":"Calling deployMongo when remote deployment fails — Docker unreachable on the destination server, mongo image pull failure, bad server config, or deploy script crash.","commonSituations":"Destination host offline, no registry egress, disk/memory exhaustion, or an invalid/unavailable MongoDB image tag.","solutions":["Read the appended error text and streamed deployment logs","Check Docker daemon health, disk, and memory on the destination server","Verify image pull access and tag validity","Fix the root cause and redeploy to clear the 'error' status"],"exampleFix":"// before\nawait deployMongo(mongoId);\n\n// after\nawait deployMongo(mongoId, (chunk) => console.log(chunk)); // stream logs to find the failing step","handlingStrategy":"try-catch","validationCode":"const m = await findMongoById(mongoId);\nif (m.applicationStatus === 'error') throw new Error('Resolve prior error before redeploy');","typeGuard":null,"tryCatchPattern":"try { await deployMongo(mongoId, onLog); } catch (e) { notify(String(e.message)); await updateMongoById(mongoId, { applicationStatus: 'error' }); }","preventionTips":["Persist streamed deploy logs","Check destination Docker host reachability first","Retry transient failures with backoff"],"tags":["deployment","docker","mongodb","internal-error"],"backgroundTag":"deployment-failed-upstream-error","analyzedSha":"546686ea3587f12ec5652217dedd9f7960fb6d15","analyzedAt":"2026-08-27T05:18:58.095Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}