Giter Club home page Giter Club logo

Comments (21)

altairbow avatar altairbow commented on June 1, 2024 1

Can we get a new release with this fix in? 1.0.7 does not contain this fix.

1.1.0 has been released.

from django-db-connection-pool.

skotori avatar skotori commented on June 1, 2024

the django-db-connection-pool is installed by 'pip install django-db-connection-pool'

from django-db-connection-pool.

altairbow avatar altairbow commented on June 1, 2024

Has django-db- connection-pool been installed yet?

from django-db-connection-pool.

skotori avatar skotori commented on June 1, 2024

Has django-db- connection-pool been installed yet?

yes

from django-db-connection-pool.

skotori avatar skotori commented on June 1, 2024

Has django-db- connection-pool been installed yet?

TBCXCD.png

from django-db-connection-pool.

skotori avatar skotori commented on June 1, 2024

Maybe Django 4.0 changed the database backends API.What is the latest version of Django based on

from django-db-connection-pool.

skotori avatar skotori commented on June 1, 2024

Django started after it was lowered from 4.0 to 3.2.Are there plans to support Django version 4.0

from django-db-connection-pool.

altairbow avatar altairbow commented on June 1, 2024

Django started after it was lowered from 4.0 to 3.2.Are there plans to support Django version 4.0

Caused by Deprecate ugettext(), ugettext_lazy(), ugettext_noop(), ungettext(), and ungettext_lazy(), I will fix it soon

from django-db-connection-pool.

altairbow avatar altairbow commented on June 1, 2024

ImproperlyConfigured has been fixed in django4_support branch, You can test it in your case.

from django-db-connection-pool.

skotori avatar skotori commented on June 1, 2024

installed the django4_support branch by 'pip install git+https://github.com/altairbow/django-db-connection-pool.git@django4_support', start normally in Django 4.0 environment

from django-db-connection-pool.

skotori avatar skotori commented on June 1, 2024

There is a problem. I don't know if it's because of my code. Start 100 threads to execute database insert, and the code will be stuck after execution for a period of time.

from django-db-connection-pool.

skotori avatar skotori commented on June 1, 2024

The length of time the code runs before it gets stuck is proportional to POOL_SIZE.

from django-db-connection-pool.

skotori avatar skotori commented on June 1, 2024

My configuration is "'POOL_OPTIONS': { 'POOL_SIZE': 10, 'MAX_OVERFLOW': 10, 'RECYCLE': 24 * 60 * 60 }". Is it because threads do not share a connection, and then the connection expires too long, resulting in thread blocking.

from django-db-connection-pool.

altairbow avatar altairbow commented on June 1, 2024

Has conn.close been called after your thread done it's work?

from django-db-connection-pool.

skotori avatar skotori commented on June 1, 2024

Has conn.close been called after your thread done it's work?

No, the connection is not closed.

from django-db-connection-pool.

altairbow avatar altairbow commented on June 1, 2024

You should call conn.close to release the connection

from django-db-connection-pool.

skotori avatar skotori commented on June 1, 2024

You should call conn.close to release the connection

But I use Django's ORM, MODEL method.

from django-db-connection-pool.

altairbow avatar altairbow commented on June 1, 2024

Django close all database connections automatically after django.core.signals.request_finished received, means Django won't release database connection before your threads finish, don't start too many threads for single user request, it's not a good idea in web development, If it's a background task, you have two choices: 1. Increase MAX_OVERFLOW or POOL_SIZE 2. in your code,call conn.close() to release database connection to pool manually

from django-db-connection-pool.

altairbow avatar altairbow commented on June 1, 2024

fixed by #27

from django-db-connection-pool.

skotori avatar skotori commented on June 1, 2024

ok, thank you.

from django-db-connection-pool.

imperio59 avatar imperio59 commented on June 1, 2024

Can we get a new release with this fix in? 1.0.7 does not contain this fix.

from django-db-connection-pool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.