# Sqlite database lock

**URL:** <https://discourse.mailinabox.email/t/sqlite-database-lock/800>\
**Category:** Help with Setup/Upgrade\
**Created:** [August 30, 2015, 10:25pm UTC](https://discourse.mailinabox.email/t/sqlite-database-lock/800 "2015-08-30T22:25:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmahadkar](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/n/bc8723/32.png) [@nmahadkar](https://discourse.mailinabox.email/u/nmahadkar)\
**Post date:** [August 30, 2015, 10:25pm UTC](https://discourse.mailinabox.email/t/sqlite-database-lock/800/1 "2015-08-30T22:25:43Z")

</div>

I tried to import my gmail contacts into owncloud but the connection timed out. Now I am getting a

`general error 5: database locked`

when I try to re-import contacts. Any solution to this?

---

<div class="post-metadata">

**Author:** ![JoshData](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/joshdata/32/2153_2.png) [@JoshData](https://discourse.mailinabox.email/u/JoshData)\
**Post date:** [August 30, 2015, 11:34pm UTC](https://discourse.mailinabox.email/t/sqlite-database-lock/800/2 "2015-08-30T23:34:03Z")

</div>

It’s probably still churning on the first import.

Easiest way to force it to stop would be to reboot the machine. Or on the machine:

```
sudo service php5-fpm restart
```

---

<div class="post-metadata">

**Author:** ![nmahadkar](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/n/bc8723/32.png) [@nmahadkar](https://discourse.mailinabox.email/u/nmahadkar)\
**Post date:** [August 31, 2015, 12:41pm UTC](https://discourse.mailinabox.email/t/sqlite-database-lock/800/3 "2015-08-31T12:41:33Z")

</div>

Tried rebooting and the above command still get

```
An exception occurred while executing 'INSERT INTO "oc_filecache" ("mimepart","mimetype","mtime","size","etag","storage_mtime","permissions","parent","path_hash","path","name","storage") SELECT ?,?,?,?,?,?,?,?,?,?,?,? WHERE NOT EXISTS (SELECT 1 FROM "oc_filecache" WHERE "storage" = ? AND "path_hash" = ?)' with params ["3", "10", 1441025149, 1, "280e6b4a9bc12d221823e0362798b06e", 1441025149, 27, "11", "fe7d316543a8085a49b4c0e77e631908", "cache\/contacts-import-1868126474", "contacts-import-1868126474", "3", "3", "fe7d316543a8085a49b4c0e77e631908"]: SQLSTATE[HY000]: General error: 5 database is locked

```

Then the import stops.

---

<div class="post-metadata">

**Author:** ![JoshData](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/joshdata/32/2153_2.png) [@JoshData](https://discourse.mailinabox.email/u/JoshData)\
**Post date:** [September 5, 2015, 8:11pm UTC](https://discourse.mailinabox.email/t/sqlite-database-lock/800/4 "2015-09-05T20:11:38Z")

</div>

I don’t know what to tell you, unfortunately. It seems like it just can’t handle a large import.

---

<div class="post-metadata">

**Author:** ![system](https://discourse.mailinabox.email/uploads/default/original/2X/4/4d0933d13c456b7e57f296aa6cc344525b6f0c70.png) [@system](https://discourse.mailinabox.email/u/system)\
**Post date:** [September 12, 2015, 8:11pm UTC](https://discourse.mailinabox.email/t/sqlite-database-lock/800/5 "2015-09-12T20:11:52Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
