GithubHelp home page GithubHelp logo

Comments (5)

ileitch avatar ileitch commented on August 14, 2024

The issue is in fact the exact same as #69. The connection hasn't been lost, it is just unable to create one due to the pool being full.

from rapns.

tpoland avatar tpoland commented on August 14, 2024

Actually, it looks like the error message may be mixing terms here, or perhaps there are two separate exceptions. There is a connect_error with MySQL because the database authentication does not complete within MySQL's connect_timeout. Increasing the timeout from 5 to 10 seconds should help with this set global connect_timeout=10;.

from rapns.

ileitch avatar ileitch commented on August 14, 2024

@tpoland I don't think that will help. The ActiveRecord connection pool is on a per-thread basis. rapns worker threads are long lived and therefore never release their claim on a database connection. Increasing the timeout will not help because no threads are going to release their connection.

This does however make me think that the solution to this is to simply have workers explicitly release connections like a Rails request lifecycle does.

from rapns.

tpoland avatar tpoland commented on August 14, 2024

@ileitch I was thinking that this should prevent the ActiveRecord ConnectTimeout perhaps abandoning less connections in the pool. Maybe the pool change could be combined with restarts of the RAPNS worker threads (via monit) at regular intervals so that you don't end up with too massive a pool.

from rapns.

ileitch avatar ileitch commented on August 14, 2024

Please try 2.0.5.rc1

from rapns.

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.