Weblate: tune VM resources and service config for better performance
Originally created by @zen on #17445 (Redmine)
Weblate is having recurrent issues with database timeouts such as:
2020-01-16 09:56:45,547 ERROR Internal Server Error: /translate/tails/thedaywefightback/it/
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.5/dist-packages/django/db/backends/mysql/base.py", line 101, in execute
return self.cursor.execute(query, args)
File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 226, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorvalue
File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 217, in execute
res = self._query(query)
File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 378, in _query
rowcount = self._do_query(q)
File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 341, in _do_query
db.query(q)
File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 280, in query
_mysql.connection.query(self, query)
_mysql_exceptions.OperationalError: (1205, 'Lock wait timeout exceeded; try restarting transaction')
This may be related with what is described in the upstream issue (also linked in the description of #16994 (closed)), which describes performance problems with the use of an “external full text engine” and links to other issues that describe memory exhaustion and timeout problems because of this.
This issue should be part of a larger combo together with (1) upgrade to latest Weblate (#17345 (closed)) and (2) switch to PostgreSQL (#16994 (closed)). This way we’d mitigate current problems and also be ready to welcome new performance-related features when they are available in Weblate.
Related issues
- Related to #17345 (closed)
- Related to #16994 (closed)
- Related to #17446 (closed)
Edited by Zen Fu