GithubHelp home page GithubHelp logo

Comments (4)

emrojo avatar emrojo commented on June 29, 2024

I've created a report from uat and checked the threads connected and it seems lighthouse uat does not have this issue. It went up from 2 to 3 threads connected, which it is quite smaller than the digits we get in production around 200 threads connected.

from lighthouse.

JamesGlover avatar JamesGlover commented on June 29, 2024

In addition to the reports, we also open connections in the plates/new endpoint (create_plate_from_barcode) in plates_helper.update_mlwh_with_cog_uk_ids.
A preliminary scan of the code suggests that this connection is only opened once per http call, but I believe that the call gets made by lighthouse_ui once per plate in a box. So definitely a candidate for multiple connections.
A quick glance suggests we are calling connection.close() in a finally block.

from lighthouse.

JamesGlover avatar JamesGlover commented on June 29, 2024

A few things I noted:

  • We have a helper method for creating connection engines, but don't use it consistently
  • We're manually opening and closing connections, it might be safer to do this via a context manager
  • SQL alchemy provides connection pooling: https://docs.sqlalchemy.org/en/13/core/pooling.html I don't think we're accidentally creating 200 pools which we only use once, but it might reduce the number of concurrent connections we have open if opening and closing connections is a little slow. (But it sounds like we're just NOT closing connections)

from lighthouse.

emrojo avatar emrojo commented on June 29, 2024

On mail today at 6:55, DBA confirmed all connections are staying below 400 (with a max set of 500). We are not requested to look into it further.

from lighthouse.

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.