botpress / v12

Botpress OSS – v12
https://v12.botpress.com
GNU Affero General Public License v3.0
71 stars 83 forks source link

Sever Connection Issues #1674

Closed dmayer93 closed 2 years ago

dmayer93 commented 2 years ago

I initially filed the below issue, but after attempting a fresh install on a separate computer, I am still running into an internal server error. As the bot is unresponsive on the web channel, I believe this may be an issue with the service, and not something that I have done. Anyone else running into this same issue?

Hello,

When attempting to deploy an update to the cloud, I end up receiving the following stack trace error:

Jul 27 09:45:35 error: An unexpected error occurred. [Error, insert into `dialog_sessions` (`context`, `context_expiry`, `created_on`, `id`, `modified_on`, `session_data`, `session_expiry`, `temp_data`) values ('{}', NULL, strftime('%Y-%m-%dT%H:%M:%fZ', 'now'), 'lss-chatbot::web::ce342bd5-10d2-4d9a-98c7-18efa995084d::385fd98c-4301-49fe-aea5-f6d55915582c', strftime('%Y-%m-%dT%H:%M:%fZ', 'now'), '{"lastMessages":[]}', NULL, '{}') - SQLITE_BUSY: database is locked]
STACK TRACE
Error: SQLITE_BUSY: database is locked
    at Client_SQLite3._query (C:\snapshot\botpress\node_modules\knex\lib\dialects\sqlite3\index.js:101:12)
    at Client_SQLite3.query (C:\snapshot\botpress\node_modules\knex\lib\client.js:165:17)
    at C:\snapshot\botpress\node_modules\knex\lib\transaction.js:331:24
From previous event:
    at Client_SQLite3.query (C:\snapshot\botpress\node_modules\knex\lib\transaction.js:326:12)
    at Runner.query (C:\snapshot\botpress\node_modules\knex\lib\runner.js:135:36)
    at C:\snapshot\botpress\node_modules\knex\lib\runner.js:39:23
From previous event:
    at Runner.run (C:\snapshot\botpress\node_modules\knex\lib\runner.js:25:16)
    at Builder.then (C:\snapshot\botpress\node_modules\knex\lib\interface.js:14:43)
    at getQuery (C:\snapshot\botpress\packages\bp\dist\core\database\helpers.js)
    at C:\snapshot\botpress\packages\bp\dist\core\database\helpers.js
    at C:\snapshot\botpress\node_modules\knex\lib\transaction.js:91:24
From previous event:
    at C:\snapshot\botpress\node_modules\knex\lib\transaction.js:77:12
    at processImmediate (internal/timers.js:456:21)
    at process.topLevelDomainCallback (domain.js:137:15)
From previous event:
    at new Transaction (C:\snapshot\botpress\node_modules\knex\lib\transaction.js:57:30)
    at Client_SQLite3.transaction (C:\snapshot\botpress\node_modules\knex\lib\client.js:121:12)
    at Function.transaction (C:\snapshot\botpress\node_modules\knex\lib\util\make-knex.js:40:31)
    at Function.insertAndRetrieve (C:\snapshot\botpress\packages\bp\dist\core\database\helpers.js)
    at SessionRepository.insert (C:\snapshot\botpress\packages\bp\dist\core\dialog\sessions\session-repository.js)
    at SessionRepository.getOrCreateSession (C:\snapshot\botpress\packages\bp\dist\core\dialog\sessions\session-repository.js)
    at async StateManager._saveState (C:\snapshot\botpress\packages\bp\dist\core\dialog\state-manager.js)
    at async StateManager.persist (C:\snapshot\botpress\packages\bp\dist\core\dialog\state-manager.js)
    at async DecisionEngine.processEvent (C:\snapshot\botpress\packages\bp\dist\core\dialog\decision-engine.js)
    at async EventEngine.onAfterIncomingMiddleware (C:\snapshot\botpress\packages\bp\dist\core\app\botpress.js)
    at async C:\snapshot\botpress\packages\bp\dist\core\events\event-engine.js

I have not made any significant changes to the bot but now my database has been locked and the Stack Trace error is preventing deployment. Has anyone run into a similair issue before and if so, how do we solve it?

Thanks!

Originally posted by @dmayer93 in https://github.com/botpress/botpress/discussions/12046