Git Product home page Git Product logo

Comments (3)

methane avatar methane commented on July 29, 2024

What could be the issue

Multiple threads use same pool, or multiple coroutine use same connection concurentlly, timeout happen during waiting result, etc...

how do I solve it?

Review your code carefully, and check one connection is not used from multi coroutine concurrently,
don't reuse connection without reading full result (this happens when timeout especially).

from tornado-mysql.

bspacedevops avatar bspacedevops commented on July 29, 2024

Thanks for the reply methane.

I have been reviewing the code, and I haven't been able to find any code where a connection is being used concurrently by multiple co-routines concurrently.(as per my knowledge :)).

The general way by which we communicate with the database is

cur = pool.execute(query, [arguments])
OR
cur = txn.execute(query, [arguments]), where txn denotes a Transaction object

followed by cur.fetchone() or a cur.fetchall().

Could you please provide me with a few code examples where-in connections are used concurrently, not sure if driver has functions to do this?

Since our database has grown is size, could this be because cur.fetchall() is failing because of memory pressure.

Also,
all connections to the database are in a try and exception block with adequate logging, so shouldn't timeout be raising an operational error, which would then get printed? Unfortunately not seeing any logs regarding the same, and hence am confused.

from tornado-mysql.

methane avatar methane commented on July 29, 2024

I don't have energy and time for this project.
I recommend you to use aiomysql instead of this.

Tornado can use asyncio libraries now.
So this project is only for dying language: Python 2.

from tornado-mysql.

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.