So changed my caching to SQlite

Hi all, I thought to improve performance I would change my store caching to SQlite. I got my ISP to install the SQlite3 apache mod overnight and today i edited the config.local.php file to this caching method.



Now Im getting an error about a locked database that shows up in the front of the store… arrgghh… I've temporarily changed the caching back to mysql, but does anyone have an idea why this is occuring?

Warning: SQLite3::query() [sqlite3.query]: Unable to prepare statement: 5, database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 133

Warning: SQLite3::query() [sqlite3.query]: Unable to prepare statement: 5, database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 133

Warning: SQLite3::query() [sqlite3.query]: database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 44

Warning: Cannot modify header information - headers already sent by (output started at /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php:133) in /yoursite/yourdirectory/public_html/core/fn.init.php on line 416

Warning: SQLite3::query() [sqlite3.query]: Unable to prepare statement: 5, database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 133

Warning: SQLite3::query() [sqlite3.query]: Unable to prepare statement: 5, database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 133

Warning: SQLite3::query() [sqlite3.query]: database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 44

Warning: SQLite3::query() [sqlite3.query]: Unable to prepare statement: 5, database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 133

Warning: SQLite3::query() [sqlite3.query]: database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 44

Warning: SQLite3::query() [sqlite3.query]: Unable to prepare statement: 5, database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 133

Warning: SQLite3::query() [sqlite3.query]: database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 44

Warning: SQLite3::query() [sqlite3.query]: Unable to prepare statement: 5, database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 133

Warning: SQLite3::query() [sqlite3.query]: database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 44

Warning: SQLite3::query() [sqlite3.query]: Unable to prepare statement: 5, database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 133

Warning: SQLite3::query() [sqlite3.query]: database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 44

Warning: SQLite3::query() [sqlite3.query]: Unable to prepare statement: 5, database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 133

Warning: SQLite3::query() [sqlite3.query]: database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 44

Warning: SQLite3::query() [sqlite3.query]: Unable to prepare statement: 5, database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 133

Warning: SQLite3::query() [sqlite3.query]: Unable to prepare statement: 5, database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 133

Warning: SQLite3::query() [sqlite3.query]: database is locked in /yoursite/yourdirectory/public_html/core/cache/class.cache_backend_sqlite.php on line 44

Have you resolved this issue? We're getting the same thing intermittently on v2.1.4 and v2.2.3

I had it a while back and struck helped me out, I had to re upload my config.local file I think



John

Any details on this? Was the config file edited at all?

[quote name='interfaceFactory' timestamp='1318123818' post='123241']

Have you resolved this issue? We're getting the same thing intermittently on v2.1.4 and v2.2.3

[/quote]



No. Our hosting provider wanted to roll the server php back from 5.3 to 5.2 but we have a lot of plugins and customisation that might've been affected. We stuck with mysql as the caching the method.

must be something to this as i have just had this occured on our site. Delete the var/cache and var/compiled and then recreate var/cache





Cheers

mysql is probably the worst caching strategy you can choose. You're going to be using the same database engine to cache info that's coming from that database. You'd be better off to have caching turned off rather than to use mysql… Just a two-cent deposit…

Hi Amit, when you say to recreate the var/cache - do you mean i should create a new file called; cahe.db inside the var/cache folder? Or will the system automatically create it?



Also, do any permissions need to be set on that file to be writable? Unfortunately, we've had sqlite working for most of the day, but are now starting to get the dreaded 'database is locked' error.


[quote name='AmitP' timestamp='1318532811' post='123649']

must be something to this as i have just had this occured on our site. Delete the var/cache and var/compiled and then recreate var/cache





Cheers

[/quote]

On my v2.2.3 store, I went back to “file” caching due to the “database is locked” issue with sqlite. Now on a completely different server and v2.2.4 build, I get the same “database is locked” problem with sqlite. Is there something I can do to get sqlite to be stable? Or is “file” caching the most stable system?

It probably depends on which sqlite your server is using. The 'sqlite' caching method will actually use either sqlite, sqlite3 or PDO sqlite depending on what it finds. Doing a PHP Info on your site should tell you what your server is configured to use. If it's other than sqlite3, I'd expect that is your problem. Have your host ensure that sqlite3 is installed and available to your site.

Thanks for the tip, I checked PHP info, and it is running sqlite3. Don't know where else to look for a solution to this issue.

This issue has come up and it seems to vary from server to server. Wish Zeke would weigh in on this topic since he seems to be the caching guru.

mysqli = MySQL Improved.



If you are using EasyApache to compile, it'll be an option to check on the third or second screen.

We’re currently getting a dedicated server built, and i’ve put in a request for both Sqlite3 and the shmop php modules to be installed.



Im going to be running 3 x Cs Cart Professional installations on the server, my plan is to let the busiest site use shmem for caching, and the other two to use Sqlite.



The server has 2gb of ram, hopefully it’s enough… :-o