-
-
Notifications
You must be signed in to change notification settings - Fork 977
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 automatic translation from other components #9118
Comments
This query is fetching the translations: Can you try running What work_mem do you have configured for PostgreSQL? |
This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger. In case your question is already answered, making a donation is the right way to say thank you! |
work_mem=16MB |
I understand that I have to wait for some result?
Edit: Refreshing Lock for this file still appears. Does turning on automatic translation through the web interface, closing the window (no response of the progress bar), turning it on again for this file, create several translation queues?
What helped temporarily:
The translation queue has cleared. I tried to translate the file through the web interface. Now it took 30 seconds to translate 90,000 strings. Previously, this file was queued for 240 minutes. I took away everyone's permission to auto-translate for the duration of the test. I am waiting for the auto translation add-on to run on schedule. EDIT3: |
Unfortunately, once automatic translation works in a few seconds, and sometimes it takes several hours. In tests, it doesn't matter if I use all components or just one component as the source. Today there are no celer queues, I turned on the translations of one component, I entered the same component as the source. Again, the translation takes several hours and the progress bar has not moved. What else can I check? I first reported the problem on Feb 23 #8832 and it's been there ever since. |
Try increasing As for the SQL do just explain, that will not actually execute the query and show what the scheduler would do:
What would be useful as well is to know how many strings we're hitting in this query:
|
I found the reason why automatic translation stops working. When there is no automatic addition of suggestions in the background, automatic translation works.
Then I turned on translation which adds suggestions for untranslated strings (about 4000 strings). Adding suggestions has been going on for over an hour now. Then I used the automatic translation again as before (points 1,2,3). The automatic translation of the component (4,000 strings) took 30 minutes. I've had this problem since February. Earlier, even when adding suggestions, I had no problems with automatic translation. |
Can you please try looking at the query I mentioned before (): SELECT COUNT("id") FROM "trans_unit" U0 LEFT OUTER JOIN "trans_suggestion" U2 ON (U0."id" = U2."unit_id") WHERE (U0."translation_id" = 5427 AND U2."id" IS NULL AND U0."state" = 0); How many rows does it hit? How slow it is? EXPLAIN ANALYZE SELECT COUNT("id") FROM "trans_unit" U0 LEFT OUTER JOIN "trans_suggestion" U2 ON (U0."id" = U2."unit_id") WHERE (U0."translation_id" = 5427 AND U2."id" IS NULL AND U0."state" = 0); It's a subquery of the main query seen above. |
The next automatic translations will be when new components appear, then I will test these database queries. I've been getting new errors for a few days, I don't know if they are related to this problem? If not, I can open a separate ticket if it's something serious. This is the first time I see this kind of error. https://eso-spolszczenie.sentry.io/share/issue/31cf28698d534edc9f10d15e23ae8d31/ and https://eso-spolszczenie.sentry.io/share/issue/30d82b5b7d7e429b8348a82a52c48eb4/ |
I couldn't check this query specifically because I have an error:
|
I changed:
and I have this result:
|
This is a new feature from Sentry, that's why you didn't see it before.
Hard to tell as it does not show which query was actually slow.
This is expected, the Zen mode fetches glossary for each string and this cannot be done in less queries due to their complexity.
This is actually the problematic part, it appears that the index is not really helping here. It might be a similar issue as in #8719, just hidden in a subquery. |
What else can I do to diagnose the problem? |
Can you try whether adding an index will make the difference?
Having output from 2 and 3 will help in deciding how to address this. |
Please indicate which query to use. |
This one:
|
->
|
Sorry, but I got the database wrong and checked on the test one, which is practically empty. |
This improves exact strings lookups like done in automatic translation or consistency checks. Issue WeblateOrg#9118 Issue WeblateOrg#1994
Point 1 fails in production:
|
This improves exact strings lookups like done in automatic translation or consistency checks. Issue WeblateOrg#9118 Issue WeblateOrg#1994
Hmm, we will need something more complex then. I've created #9267, let's see if all tests pass, I will then test it on some larger database. |
Thank you for your report; the issue you have reported has just been fixed.
|
After testing #9267 on several test data, it seems to address the issue, but it would be great to see how that performs in your environment. |
I will test when the bleeding docker image appears |
It should be there tomorrow. |
I did the updates, I don't have access to the console today. I checked adding suggestions using the weblate interface, instead of several hours now it takes ten seconds. @nijel |
Describe the issue
After using the automatic translation of a component with "other components", the translation never ends.
The console always shows:
One of the automatic translation tasks was triggered manually via the web interface. The second task comes from the automatic translation add-on.
Automatic translation does not work completely.
I already tried
Steps to reproduce the behavior
No response
Expected behavior
No response
Screenshots
No response
Exception traceback
No response
How do you run Weblate?
Docker container
Weblate versions
Weblate deploy checks
Additional context
very slow database process:
The text was updated successfully, but these errors were encountered: