Gekko: SQLITE_CORRUPT error 11, on Bash on Windows 10

Created on 5 Sep 2017  路  12Comments  路  Source: askmike/gekko

  • I'm submitting a ...
    [x ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

  • Action taken
    Normal operation

  • Expected result
    No database errors

  • Actual result
    When performing various operation I will occasionally run into SQLITE_CORRUPT error.

  • Error message
    { Error: SQLITE_CORRUPT: database disk image is malformed
    at Error (native) errno: 11, code: 'SQLITE_CORRUPT' }
    xxx POST /api/backtest 500 17s -

    Error: non-error thrown: Child process has died.
    at Object.onerror (/mnt/c/Users/oHap1/Desktop/BOT/gekko/node_modules/koa/lib/context.js:105:40)
    at process._tickCallback (internal/process/next_tick.js:109:7)

  • Other information

I saw a similar issue marked as close, which suggested deleting the database and starting over. I'm going to try the same, unless you would like a copy of the database for review.

Most helpful comment

I had this exact same problem. I even tried the developer branch, but it did not help. And yes, I also changed the pragma to "DEL".
After some searching I found that using the value "TRUNCATE" could work better.
So, I changed the value, and it seems to work.
Can anyone confirm that this is the proper solution?

All 12 comments

Just a quick question: where you running a lot of Gekkos at the same time? Or did anything else strange happen?

@thegamecat have you ever had this problem before?

No, just importing some data from poloniex. On a related note, I just set up a paper trader Gekko, which gives me this error:

Gekko 3651863886035835 started
--> POST /api/startGekko 200 77ms 438b
<-- POST /api/getCandles
events.js:160
throw er; // Unhandled 'error' event
^

Error: SQLITE_IOERR: disk I/O error
at Error (native)
RECEIVED ERROR IN GEKKO 27610659009441
Child process has died.

Will try deleting the database later/tomorrow, and see if that helps. Thanks for the quick reply!

Yep, it's almost certainly the pragma.
Instructions to fix are here: http://gekkowarez.com/running-gekko-sqlite-in-windows-10-bash/

Forgot to say, I already set it to "DEL" as per the instructions.

Tried on a new system, different computer, still Win 10 with Bash. Followed the instruction re: DEL. Still get similar errors.

{ Error: SQLITE_CORRUPT: database disk image is malformed
at Error (native) errno: 11, code: 'SQLITE_CORRUPT' }
xxx POST /api/backtest 500 6,047ms -

Error: non-error thrown: Child process has died.
at Object.onerror (/home/MYNAME/gekko/node_modules/koa/lib/context.js:105:40)
at process._tickCallback (internal/process/next_tick.js:109:7)

Hrm, try and download one of these dbs and see what happens:
http://gekkowarez.com/download-category/trading-data/

Which version of bash are you running, 14 or 16?

Running 16. Downloaded the poloniex one, but having some troubles getting gekko to recognize there's data in the history folder (copied it in using bash). Will test again bit later next week. Thanks for your replies!

I had this exact same problem. I even tried the developer branch, but it did not help. And yes, I also changed the pragma to "DEL".
After some searching I found that using the value "TRUNCATE" could work better.
So, I changed the value, and it seems to work.
Can anyone confirm that this is the proper solution?

Thanks @ftamminga , that fixed my problem. Exactly the same error.

great stuff, maybe we should add this to the docs?

@ftamminga
Could you share how did you change pragma?

Was this page helpful?
0 / 5 - 0 ratings