Server can't access the SQLite database!

#1
Hi,

I'm using SQLite3 as my database. I've setup my application and deployed it using capistrano. I'm running the application on Litespeed Server 3.3 and Rails edge. I can access the database through the rails console, so my configurations are fine. But as soon as the rails app tries to access the database the following exception is thrown:
Code:
ActiveRecord::StatementInvalid (SQLite3::SQLException: SQL logic error or missing database
I can't figure out why this exception is thrown. I'd appreciate any help.

Bye,
Tino
 

mistwang

LiteSpeed Staff
#2
You can try closing the DB connection after the framework initialization.
That's because ruby LSAPI will fork all children processes off the parent, file handles to SQLite db are inherited, may cause trouble when multiple processes try to access the DB using the same file handle.

Another way to debug is to "strace/truss" the ruby process.
 
Top