-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
423 Locked
error when creating a new component with languages and doing auto-translate
#13345
Comments
Weblate locks internally the component for some operations, for example to avoid concurrent manipulation with the files. Retrying later should work. You should be able to see what is going on in the server logs. |
Command to get the log:
As you can see, there are other components (e.g. This is our server log from the first
But from previous calls (I do not know from which request, but I think when uploading the new source file) I can see some locks with Is there a chance to get the timeout of the lock with the Another question: In the access logs, I see that some crawlers access the edit page of strings. Does this also lead to a lock? For reference, I have found the following locks which have more than 5 seconds timeout: Lines 98 to 105 in 6763676
weblate/weblate/utils/backup.py Lines 39 to 41 in 6763676
Lines 114 to 116 in f595bb9
|
The timeout applies when acquiring the lock and waiting while other process holds the lock. The locking happens on component or repository level, so when components share a single repository they will wait for a single lock when Weblate is working with the repository. |
Describe the issue
The following describes a sequential process of creating a new component and uploading the main POT file with new languages and auto translating them. Additionally, you can see the output within our custom logs.
1.) We create a new component with
POST /api/projects/(string: project)/components/
✅ This is successful.
2.) We install an addon with
POST /api/components/(string: project)/(string: component)/addons/
✅ This is successful.
3.) We create languages in the freshly created component with
POST /api/components/(string: project)/(string: component)/translations/
✅ This is successful.
4.) We upload the main POT file with
POST /api/translations/(string: project)/(string: component)/(string: language)/file
✅ This is successful.
5.) We auto translate the created languages with machine translation with
POST /api/translations/(string: project)/(string: component)/(string: language)/autotranslate/
❌ The response is a
423 Locked
error. All the requests to the REST API are sequential and never run in parallel. In our tests we also made sure that the component is not locked by user access.But, I found this ticket: #4666, especially the comment #4666 (comment). Relevant code:
weblate/weblate/vcs/apps.py
Lines 104 to 116 in f595bb9
Is there a chance to find out what caused the lock? Why is it 120 seconds?
I already tried
Steps to reproduce the behavior
See above.
Expected behavior
No lock error
Screenshots
No response
Exception traceback
No response
How do you run Weblate?
Docker container
Weblate versions
No response
Weblate deploy checks
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: