Skip to content
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

Slow reports after upgrading to v2.13.2 #975

Closed
cdmwebs opened this issue Dec 19, 2024 · 6 comments · Fixed by appsignal/sql_lexer#33
Closed

Slow reports after upgrading to v2.13.2 #975

cdmwebs opened this issue Dec 19, 2024 · 6 comments · Fixed by appsignal/sql_lexer#33
Assignees
Labels

Comments

@cdmwebs
Copy link

cdmwebs commented Dec 19, 2024

Describe the bug

We're still working to narrow down the actual issue, but after upgrading our app from v2.13.0 to v2.13.2, one of our async tasks that previously took ~3 seconds ballooned to ~3 minutes. The SQL body of the insert statements are fairly large.

We tested our docker image, application server, database connection, VPC timing, and finally disabled Appsignal to try to figure out where the issue was. We noticed an immediate improvement with Appsignal disabled.

We upgraded to 2.13.2 on 11/25, which is roughly the same time the issue appears in our samples. We then downgraded our staging and production servers to 2.13.0 and (so far) performance has returned to prior levels.

Still trying to see if we can provide additional info but wanted to open this to get the ball rolling. It could possibly be related to #971.

To Reproduce

Steps to reproduce the behavior:

TBD

@cdmwebs cdmwebs added the bug label Dec 19, 2024
@unflxw
Copy link
Contributor

unflxw commented Dec 19, 2024

Hi @cdmwebs, thank you for reporting this!

If you think it could be related to these large SQL INSERT statements, the first thing I'd suggest is to try setting the instrument_ecto config option to false. This should disable AppSignal's instrumentation of SQL queries. If doing so on version 2.13.2 mitigates the issue you're encountering, it would hint towards the SQL query being the issue.

In between the two versions of our Elixir integration that you upgraded from, we changed how INSERT INTO ... VALUES queries are sanitized by our agent. This might be the underlying cause of the issue. If possible, I would ask you to provide a sample of one of those queries, as unaltered as possible, over at [email protected] -- please include a link to this GitHub issue in the email.

I see that you also mention that you think it might be related to #971. Do you have a theory as to why? Does your application use check-ins, or fetch data using Hackney?

@cdmwebs
Copy link
Author

cdmwebs commented Dec 19, 2024

That does seem relevant, @unflxw. I forgot about the NIF. We'll get a query over to you soon. Thanks for the quick response.

@codingbull
Copy link

If doing so on version 2.13.2 mitigates the issue you're encountering, it would hint towards the SQL query being the issue.

Yes, setting instrument_ecto: false does seem to mitigate the slowness on appsignal: 2.13.2 and appsignal_phoenix: 2.6.0

@shairyar
Copy link
Member

@unflxw
Copy link
Contributor

unflxw commented Dec 20, 2024

Hi @cdmwebs @codingbull,

AppSignal for Elixir 2.13.3 has been released, with a fix to the issue above. 🎉 Please let us know if you run into any problems with it.

@unflxw unflxw closed this as completed Dec 20, 2024
@codingbull
Copy link

Can confirm that 2.13.3 has addressed this slowness. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants