-
Notifications
You must be signed in to change notification settings - Fork 67
Prepared statements exceeding limits when upgrading from 0.5 to 0.6 #147
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
Comments
We are experiencing the exact same. |
Thank you for the report. I am afraid this commit introduced the issue. /cc @greg-rychlewski Can you please try running from commit: 1014f1c and see if the issue persists? |
Hi @pierot @lucacorti , Do you know if you are using prepared: :named or :unnamed? Thank you |
@greg-rychlewski we don't have it set, so I guess it is |
@josevalim We'll try using that version. @greg-rychlewski No, we are not setting any |
@pierot @lucacorti Thanks and sorry a couple other questions: are you using Ecto with MyXQL adapter or MyXQL directly? |
@greg-rychlewski We are mostly using myxql via the Ecto adapter with Repo.all/one |
@greg-rychlewski Only using Ecto with MyXQL adapter and Repo.all. |
@josevalim looks like it's working with
|
No, sorry, I was on the wrong node, still having problems with prepared statements growing indefinitely even with that version. |
@lucacorti @pierot can you please try master? I have reverted both commits that could have caused this. |
@josevalim I have an idea what the issue could be. But it's difficult for me to set up the environment needed right now. In multi-node setups prepared statements with the same name can be saved with different refs. If it was prepared on one node then executed on another it will be re-prepared and the next time it's executed on the original node, the refs won't match and it will be re-prepared again. Before the cache change commit, executions would check for the name and not the ref. So each node would only be able to re-prepare an existing statement once. If it went back to checking for name instead of ref I believe this issue should disappear. |
@josevalim I'm running latest master in production, seems to behave like 0.5.2. |
Thank you! v0.6.1 is out! |
After upgrading to myxql 0.6 we saw prepared statemets constantly growing over time and exceeding the configured limit (16k)
while on 0.5 they are a small constant number
The text was updated successfully, but these errors were encountered: