Skip to content

Conversation

@dividedmind
Copy link
Contributor

While I couldn't reproduce it, a user has reported seeing a stack
overflow while processing an SQL query with MySQL and django. It
seems to have been caused by appmap querying for the server version,
which entails another SQL query against the server with MySQL.

Since MySQL backend caches that information, querying it when first
establishing the connection ensures the additional query is avoided
later at runtime, thus avoiding this problem.

Fixes #158

@dividedmind dividedmind requested a review from apotterri June 22, 2022 16:33
@dividedmind dividedmind self-assigned this Jun 22, 2022
@dividedmind
Copy link
Contributor Author

dividedmind commented Jun 23, 2022

Note I noticed that the smoke test now pulled flask 2 and failed. I forced using flask 1 in the test and created an issue for this: #160

Copy link
Contributor

@apotterri apotterri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

While I couldn't reproduce it, a user has reported seeing a stack
overflow while processing an SQL query with MySQL and django. It
seems to have been caused by appmap querying for the server version,
which entails another SQL query against the server with MySQL.

Since MySQL backend caches that information, querying it when first
establishing the connection ensures the additional query is avoided
later at runtime, thus avoiding this problem.

Fixes #158
@dividedmind dividedmind force-pushed the 158-cannot-recover-from-stack-overflow-error-running-pytest-with-django-and-mysql branch from 3444d63 to 5d72861 Compare June 24, 2022 08:42
@dividedmind dividedmind merged commit 5d72861 into master Jun 27, 2022
@dividedmind dividedmind deleted the 158-cannot-recover-from-stack-overflow-error-running-pytest-with-django-and-mysql branch June 27, 2022 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot recover from stack overflow error running pytest with django and mysql

3 participants