P
P
pro100hikka982015-10-24 14:24:14
PHP
pro100hikka98, 2015-10-24 14:24:14

SQLite database is blocked, how to solve?

I wrote a script that, when run from the CLI, selects random 100 pictures from a folder and adds them to the SQLite database. Then, choosing these pictures from the database, he uploads them to Imgur. Everything seems to be working, but from time to time an error pops up which is presented below. I will repeat sometimes the script fulfills normally.

PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 5 database is locked' in /home/admin/web/domain.com/public_html/libs/conf.php:129
Stack trace:
#0 /home/admin/web/domain.com/public_html/libs/conf.php(129): PDOStatement->execute(Array)
#1 /home/admin/web/domain.com/public_html/libs/cron.php(25): uploadPicture(Object(PDO))
#2 {main}
  thrown in /home/admin/web/domain.com/public_html/libs/conf.php on line 129

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Mirilaczvili, 2015-10-24
@2ord

Use SQLite for its intended purpose - in single user mode. The website is a multi-user system.
Go to suitable RDBMS solutions.

P
Puma Thailand, 2015-10-24
@opium

Well, some script you have locked the database, look for which one through lsof

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question