Workaround for Android error „The connection pool for database ‘/data/user/0/com.android.providers.contacts/databases/contacts2.db’ has been unable to grant a connection to thread X (ContactsProviderWorker) …“

If you are living with Android Version 4.x or Cyanogenmod 10.x then you maybe recognize problems with some apps that want to retrieve data from the contacts database (contacts2.db). Remarkable indicators concerning my phone were:

  • Contact app did not find any contact
  • Other apps lacked or hung
  • Enormous battery drain

The error stays for quite a while and is somewhen solved very surprisingly. In the logs it reads as follows:

W/SQLiteConnectionPool (X): The connection pool for database ‘/data/user/0/com.android.providers.contacts/databases/contacts2.db’ has been unable to grant a connection to thread X (X) with flags X for X seconds.

Seems, that there were different patches like it was reported here. But that was not a solution for me, because my phone is not provided with updates anymore. So here is my solution (requires root):

  • Rename the contacts2.db to something different (contacts2.db.bak)
  • Reboot
  • Delete the newly created contacts2.db and rename your backup file back to contacts2.db
  • reboot

2 thoughts on “Workaround for Android error „The connection pool for database ‘/data/user/0/com.android.providers.contacts/databases/contacts2.db’ has been unable to grant a connection to thread X (ContactsProviderWorker) …“

  1. Do you know what is causing this problem?
    How to fix it on non-rooted phones, where it is impossible to access contacts2.db file?

    1. Hi Pawel, I don’t know the root cause. But whatever it is (refers to an Android Bug), it causes the SQLite DB to stay locked. Only non rooted solution would be to Upgrade the OS I think as this bug was fixed in higher Android Versions.

Leave a Reply

Your email address will not be published. Required fields are marked *