cal.com
cal.com copied to clipboard
Error: An error occured while querying the database.
The word "occured" is misspelled, but more importantly, the following issue is happening in my self-hosted container running on an unRaid server:
Issue Summary
Accessing the Event Types tab in a self-hosted environment is not working. Everything hangs but switching to other tabs (e.g. bookings, availability) work fine. Something is missing from the Postgres database since updating the container. Looking for a new column Host.priority which does not exist.
Technical details
@calcom/web:start: 15:38:50:255 ERROR[redactError] Error: {"name":"PrismaClientKnownRequestError","code":"P2022","clientVersion":"5.4.2","meta":{"column":"Host.priority"}} @calcom/web:start: Something went wrong Error: An error occured while querying the database. @calcom/web:start: at redactError (/calcom/apps/web/.next/server/chunks/99216.js:1:561) @calcom/web:start: ... 7 lines matching cause stack trace ... @calcom/web:start: at async /calcom/node_modules/@trpc/server/dist/adapters/next.js:49:9 { @calcom/web:start: code: 'INTERNAL_SERVER_ERROR', @calcom/web:start: name: 'TRPCError', @calcom/web:start: [cause]: Error: An error occured while querying the database. @calcom/web:start: at redactError (/calcom/apps/web/.next/server/chunks/99216.js:1:561) @calcom/web:start: at /calcom/apps/web/.next/server/chunks/26535.js:1:1565 @calcom/web:start: at async callRecursive (/calcom/node_modules/@trpc/server/dist/unstable-core-do-not-import/procedureBuilder.js:127:32) @calcom/web:start: at async procedure (/calcom/node_modules/@trpc/server/dist/unstable-core-do-not-import/procedureBuilder.js:157:24) @calcom/web:start: at async inputToProcedureCall (/calcom/node_modules/@trpc/server/dist/unstable-core-do-not-import/http/resolveHTTPResponse.js:49:22) @calcom/web:start: at async Promise.all (index 0) @calcom/web:start: at async Object.resolveHTTPResponse (/calcom/node_modules/@trpc/server/dist/unstable-core-do-not-import/http/resolveHTTPResponse.js:186:37) @calcom/web:start: at async /calcom/node_modules/@trpc/server/dist/adapters/node-http/nodeHTTPRequestHandler.js:84:9 @calcom/web:start: at async /calcom/node_modules/@trpc/server/dist/adapters/next.js:49:9 @calcom/web:start: } @calcom/web:start: 15:38:52:282 ERROR[redactError] Error: {"name":"PrismaClientKnownRequestError","code":"P2022","clientVersion":"5.4.2","meta":{"column":"Host.priority"}} @calcom/web:start: Something went wrong Error: An error occured while querying the database. @calcom/web:start: at redactError (/calcom/apps/web/.next/server/chunks/99216.js:1:561) @calcom/web:start: ... 7 lines matching cause stack trace ... @calcom/web:start: at async /calcom/node_modules/@trpc/server/dist/adapters/next.js:49:9 { @calcom/web:start: code: 'INTERNAL_SERVER_ERROR', @calcom/web:start: name: 'TRPCError', @calcom/web:start: [cause]: Error: An error occured while querying the database.
Evidence
Running latest tag for calcom in unRaid docker container and postgresql15 v15.6 and error pops up in both containers logs.
Postgres error log:
2024-02-17 11:38:00.098 EST [393] ERROR: column Host.priority does not exist at character 92 2024-02-17 11:38:00.098 EST [393] STATEMENT: SELECT "public"."Host"."userId", "public"."Host"."eventTypeId", "public"."Host"."isFixed", "public"."Host"."priority" FROM "public"."Host" WHERE "public"."Host"."eventTypeId" IN ($1,$2,$3,$4,$5,$6) OFFSET $7
Engineer dispatched. See details on the Maige dashboard.
Name | Status | Message | Updated (UTC) |
---|---|---|---|
Fix Event Types Tab Hanging in Self-Hosted Environment | ❌ Error (inspect) | Errored | Feb 17, 2024, 4:49 PM |
I'm seeing similarities in this issue and the errors mentioned here: https://github.com/calcom/docker/issues/329
I have downgraded to v.3.7.11 and have no errors with the database currently.
Resolved with the addition of DATABASE_DIRECT_URL as mentioned in https://github.com/calcom/docker/issues/329
I'm facing this error when creating booking using https://api.cal.com/v1/
Any help please?