[sqlalchemy] Re: Pool connections high-water, session query counter?

2017-09-08 Thread YKdvd
In a separate thread, Mike had a demo which kept a query count in a Session instance by stamping a reference to the Session in its connections. It got removed

Re: [sqlalchemy] Re: Pool connections high-water, session query counter?

2017-09-05 Thread YKdvd
There's no large numbers involved in any of the relationships, and shouldn't be any conditionality. For the route I've been looking at as an example, it is specifying a specific instance of Thing. My pre-route stuff in Flask is loading a single instance each of what might be called

Re: [sqlalchemy] Re: Pool connections high-water, session query counter?

2017-09-01 Thread Mike Bayer
doesn't sound like a lock (MySQL is a very un-lockish database), sounds like you have a query that occasionally returns a huge number of rows, such as from a broken JOIN condition or similar.The occasional nature without any errors, as well as that the operation you say should only be doing

[sqlalchemy] Re: Pool connections high-water, session query counter?

2017-09-01 Thread YKdvd
Turned on the slow query log, doesn't seem to be that. The fact that it isn't consistently bad for similar hits, and also seems to need some load to be exposed makes me thing either some contention while inside the request in Python, including lazy loads. I have been able to get some timings

[sqlalchemy] Re: Pool connections high-water, session query counter?

2017-09-01 Thread Jonathan Vanasco
what do your database and server logs show? are there slow query timeouts, deadlocks, etc? are these happening during peak load? 10-30 seconds looks more like an issue with competing locks or available workers, than potentially pool checkouts or lazy loading. aside from db logs, i've found