Skip to content

The connection pool for database 'xxx' has been unable to grant a connection to thread 376 (pool-5-thread-1) with flags 0x2 for 180.01001 seconds #355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
anthinkingcoder opened this issue May 13, 2020 · 3 comments
Labels
bug Something isn't working platform: Android This is Android specific Stale

Comments

@anthinkingcoder
Copy link

Current behavior

setItem not callback

Expected behavior

setItem callback

Repro steps

when excute mReactDatabaseSupplier.get().setTransactionSuccessful();,
I found get() not enter。it‘s block,maybe not get lock

  1. add log
    C7BAAFBD-ED33-499E-9A71-645F17883000
    4415314F-9268-4DD5-BDD6-6422014FF2BA

run it, show the log。mReactDatabaseSupplier.get() not log get lock AsyncTask #1,it‘s block。
84A9EC98-EF01-4DAE-B9EB-BE60C3B1DCFB

  1. use Lock instead of synchronized
    get()
    image
    ensureDatabase()
    image

it's ok。
8F55E933-18AD-431A-933A-D0E803F78BCF

Environment

  • Async Storage version: 1.9.0
  • React-Native version:0.59
  • Platform tested: Android9
  • Logs/Error that are relevant:
@krizzu
Copy link
Member

krizzu commented May 19, 2020

@anthinkingcoder Hey, thanks for the insight. We had similar issue before, hence we created Dedicated Executor pool for this case. Can you give it a try?

@anthinkingcoder
Copy link
Author

@krizzu I tried this method, but I found it was not possible。Only changing the lock mechanism can solve my problem。

@krizzu krizzu mentioned this issue Jul 27, 2020
6 tasks
@tido64 tido64 added bug Something isn't working platform: Android This is Android specific labels Oct 14, 2020
@github-actions
Copy link

This issue has been marked as stale due to inactivity. Please respond or otherwise resolve the issue within 7 days or it will be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform: Android This is Android specific Stale
Projects
None yet
Development

No branches or pull requests

3 participants