Skip to content

Accessing dead thread objects while using SQLAlchemy with Pylons Paste HTTP Server #754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sqlalchemy-bot opened this issue Aug 21, 2007 · 4 comments
Labels
blocker issue that must be resolved asap as it is preventing things from working bug Something isn't working connection pool
Milestone

Comments

@sqlalchemy-bot
Copy link
Collaborator

Migrated issue, originally created by Anonymous

While using SQLAlchemy 0.4.0beta4 with Paste HTTP Server (threaded) in high load conditions
(such as testing server performance with Apache Bench), I'm getting an error:

'sqlalchemy/pool.py', line 158 in connect
return self._threadconnsthread.get_ident()().checkout()
AttributeError: 'NoneType' object has no attribute 'checkout'

(full traceback in attached file)

When I'm using SQLAlchemy 0.4beta3 all seems fine.

To setup my application I closely followed 'SQLAlchemy 0.4 for people in a hurry' tutorial
http://wiki.pylonshq.com/display/pylonscookbook/SQLAlchemy+0.4+for+people+in+a+hurry

Unfortunately I can't attach a complete test case, because of the nature of this problem (threading).


Attachments: error_traceback.txt

@sqlalchemy-bot
Copy link
Collaborator Author

Anonymous wrote:

Full traceback

@sqlalchemy-bot
Copy link
Collaborator Author

Changes by Anonymous:

  • attached file error_traceback.txt

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

OK, im glad this came up. I'd very much like you to try e755e90, where I've restored the usage of a WeakValueDictionary there instead of a regular dict of weakrefs. While i could also have tried a conditional check here, i dont like the idea of the dict growing with dead weakrefs. Whats still different versus beta3 is that the connection pool is using the "threadlocal" setting internally, for connections that are used by "connectionless" executions only. So if your high load app runs fine with it (which it should), then we know we're getting pretty stable.

Im hoping to put out beta4 today as well...but I really want to see at least how well 3406 runs. if still issues, reopen the ticket and maybe we'll have to reconsider the "threadlocal" setting totally.

@sqlalchemy-bot
Copy link
Collaborator Author

Changes by Michael Bayer (@zzzeek):

  • removed labels: high priority
  • added labels: blocker
  • changed status to closed

@sqlalchemy-bot sqlalchemy-bot added connection pool bug Something isn't working blocker issue that must be resolved asap as it is preventing things from working labels Nov 27, 2018
@sqlalchemy-bot sqlalchemy-bot added this to the 0.4.0 milestone Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker issue that must be resolved asap as it is preventing things from working bug Something isn't working connection pool
Projects
None yet
Development

No branches or pull requests

1 participant