Toaster
Toaster

Reputation: 93

SQLite3 Disk IO Error

I'm experiencing a disk I/O error during a query on a SQL database. I have several large (95gb) db with the same schema, and am trying to run the same query on all of them. Two run fine, returning ~28,000,000 results; one hits a 'Disk I/O error', both when run via SQLalchemy and command line.

If I limit the query to return ~10,000,000 results, I don't get the error- but I need the full output as these are photons from a large physics simulation.

The full error message in SQLalchemy is:

Traceback (most recent call last):
  File "/Users/swm1n12/anaconda/lib/python3.5/site-packages/sqlalchemy/engine/result.py", line 1120, in fetchall
    l = self.process_rows(self._fetchall_impl())
  File "/Users/swm1n12/anaconda/lib/python3.5/site-packages/sqlalchemy/engine/result.py", line 1071, in _fetchall_impl
      return self.cursor.fetchall()
sqlite3.OperationalError: disk I/O error

And for sqlite3 on the command line:

Error: disk I/O error

Can anyone tell me how I'd be able to figure out what's going wrong?

(I'm aware that for DB of this size, SQLite is not a great choice- they turned out to be bigger than I expected and ~academic publishing pressures~ means retooling SQL version and rerunning the code is not practical)

Upvotes: 2

Views: 7529

Answers (1)

CL.
CL.

Reputation: 180172

In the sqlite3 command-line shell, you can use .log stderr to see the OS errors.

But "disk I/O error" means that there is an error on your disk. Throw it away, and restore the database from the backup.

Upvotes: 3

Related Questions