SnailyCAD / snaily-cadv4

💻 An open source Computer Aided Dispatch (CAD) for FiveM, this is a web based integration for communities who love police roleplaying and dispatching. Discord: https://discord.gg/eGnrPqEH7U
https://docs.snailycad.org/docs/getting-started
MIT License
140 stars 85 forks source link

CAD Disconnecting Randomly #1117

Closed Legacy-TacticalGamingInteractive closed 2 years ago

Legacy-TacticalGamingInteractive commented 2 years ago

What version of Node.js are you using?

17.3.0

What version of npm are you using?

7.10.0

What operating system are you using?

Windows Server 2019

What version of SnailyCAD are you currently using?

1.26.5

Describe the Bug

[1] }
[1] { PROCESS_CWD: 'C:\\nginx\\html\\snaily-cadv4\\apps\\api' }
[1] { PROCESS_CWD: 'C:\\nginx\\html\\snaily-cadv4\\apps\\api' }
[1] { PROCESS_CWD: 'C:\\nginx\\html\\snaily-cadv4\\apps\\api' }
[1] { PROCESS_CWD: 'C:\\nginx\\html\\snaily-cadv4\\apps\\api' }
[1] { PROCESS_CWD: 'C:\\nginx\\html\\snaily-cadv4\\apps\\api' }
[1] { PROCESS_CWD: 'C:\\nginx\\html\\snaily-cadv4\\apps\\api' }
[1] { PROCESS_CWD: 'C:\\nginx\\html\\snaily-cadv4\\apps\\api' }
[1] Error:
[1] Invalid `prisma.officer.updateMany()` invocation:
[1]
[1]
[1] Error occurred during query execution:
[1] ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(E40P01), message: "deadlock detected", detail: Some("Process 12896 waits for ShareLock on transaction 608681; blocked by process 8208.\nProcess 8208 waits for ShareLock on transaction 608682; blocked by process 12896."), hint: Some("See server log for query details."), position: None, where_: Some("while updating tuple (7,3) in relation \"Officer\""), schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("deadlock.c"), line: Some(1153), routine: Some("DeadLockReport") }) }) })
[1]     at RequestHandler.handleRequestError (C:\nginx\html\snaily-cadv4\node_modules\@prisma\client\runtime\index.js:30855:13)
[1]     at RequestHandler.request (C:\nginx\html\snaily-cadv4\node_modules\@prisma\client\runtime\index.js:30834:12)
[1]     at async PrismaClient._request (C:\nginx\html\snaily-cadv4\node_modules\@prisma\client\runtime\index.js:31812:16)
[1]     at async Promise.all (index 0)
[1]     at async setInactiveUnitsOffDuty (C:\nginx\html\snaily-cadv4\apps\api\src\lib\leo\setInactiveUnitsOffDuty.ts:6:3)
[1] yarn workspace @snailycad/api generate && yarn workspace @snailycad/api start exited with code 1

Expected Behavior

CAD has disconnected and there is the information from the console. Not sure why its doing it.

To Reproduce

No response

Legacy-TacticalGamingInteractive commented 2 years ago
[     script:sna-alpr] Error: SyntaxError: Unexpected token < in JSON at position 0
[     script:sna-alpr]     at JSON.parse (<anonymous>)
[     script:sna-alpr]     at consumeEnd (@sna-alpr/server/server.js:5208:24)
[     script:sna-alpr]     at BodyReadable.<anonymous> (@sna-alpr/server/server.js:5195:11)
[     script:sna-alpr]     at BodyReadable.emit (node:events:394:28)
[     script:sna-alpr]     at BodyReadable.emit (@sna-alpr/server/server.js:5084:22)
[     script:sna-alpr]     at endReadableNT (node:internal/streams/readable:1343:12)
[     script:sna-alpr]     at processTicksAndRejections (node:internal/process/task_queues:83:21)

Also I see this in the server console errors