{"record":{"id":"6f866b3c09dcbc8d","repo":"Dokploy/dokploy","slug":"internal-server-error-6f866b","errorCode":"INTERNAL_SERVER_ERROR","errorMessage":"Error on deploy libsql${error}","messagePattern":"Error on deploy libsql(.+?)","errorType":"exception","errorClass":"TRPCError","httpStatus":500,"severity":"critical","filePath":"packages/server/src/services/libsql.ts","lineNumber":162,"sourceCode":"\t\t\t\t`docker pull ${quote([libsql.dockerImage])}`,\n\t\t\t\tonData,\n\t\t\t);\n\t\t} else {\n\t\t\tawait pullImage(libsql.dockerImage, onData);\n\t\t}\n\n\t\tawait buildLibsql(libsql);\n\t\tawait updateLibsqlById(libsqlId, {\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 updateLibsqlById(libsqlId, {\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 libsql${error}`,\n\t\t});\n\t}\n\treturn libsql;\n};\n","sourceCodeStart":144,"sourceCodeEnd":169,"githubUrl":"https://github.com/Dokploy/dokploy/blob/546686ea3587f12ec5652217dedd9f7960fb6d15/packages/server/src/services/libsql.ts#L144-L169","documentation":"Thrown by deployLibsql when any step of the deployment pipeline throws: it streams the error via onData, marks the application status as 'error' via updateLibsqlById, then rethrows as INTERNAL_SERVER_ERROR with the raw error appended to the message. The root cause is in the appended error text (e.g. Docker/Dokploy driver failures).","triggerScenarios":"Calling deployLibsql when the underlying remote deployment fails — Docker API unreachable on the destination server, image pull failure, bad server credentials, or a Dokploy deploy script exiting non-zero.","commonSituations":"Destination server offline or SSH/Docker connection misconfigured, network egress blocked so the libsql/Turso image can't be pulled, or resource exhaustion (disk/memory) on the worker.","solutions":["Read the appended error text and the deployment logs streamed via onData to identify the failing step","Check Docker daemon availability and disk space on the destination server","Verify image registry connectivity / credentials for the libsql image","Retry the deployment after fixing the root cause; the row status stays 'error' until then"],"exampleFix":"// before\nawait deployLibsql(libsqlId); // throws 'Error on deploy libsqlError: ...'\n\n// after\nawait deployLibsql(libsqlId, (chunk) => console.log(chunk)); // capture streamed logs to locate the failing step","handlingStrategy":"try-catch","validationCode":"const l = await findLibsqlById(libsqlId);\nif (l.applicationStatus === 'error') throw new Error('Fix prior failed deploy first');","typeGuard":null,"tryCatchPattern":"try { await deployLibsql(libsqlId, onLog); } catch (e) { const m = String(e.message); await updateLibsqlById(libsqlId, { applicationStatus: 'error' }); alertDeployFailure(m, collectedLogs); }","preventionTips":["Stream onData logs into persistent storage for diagnosis","Health-check destination Docker hosts before deploying","Retry with backoff on transient network errors"],"tags":["deployment","docker","libsql","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"}