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

Syncing translations with DB stuck at 50% #59

Open
dowadidi opened this issue Aug 18, 2022 · 4 comments
Open

Syncing translations with DB stuck at 50% #59

dowadidi opened this issue Aug 18, 2022 · 4 comments
Assignees

Comments

@dowadidi
Copy link

Description

Syncing translations with DB got stuck at 50%, halting the queue altogether. We ended up having a backlog of 21k tasks before anyone noticed.

Steps to reproduce

  1. Update translation, triggering syncing translations with DB
  2. Gets stuck at 50%

Additional info

  • Craft version: 3.7.43
  • PHP version: 7.4.30
  • Database driver & version: MySQL 5.7.35
  • Plugin version: 2.2.1
@kerrig
Copy link

kerrig commented Oct 28, 2022

We're also running into this same issue. Eventually causing OOM errors as well. If there's no quick fix could we possibly add a config setting to disable the sync queue job for now?

Additional info

Craft version: 3.7.57
PHP version: 7.3.33
Database driver & version: MySQL 5.5.5
Plugin version: 2.3.2

@naboo
Copy link

naboo commented Mar 6, 2024

We're also experiencing the exact same issue. DB keeps clogging up with either empty or numeric string translations and the sync job just gets stuck at 50%.

We are running latest Craft CMS and latest plugin version as of date 2024-03-06.

@andrelopez andrelopez self-assigned this Mar 6, 2024
@andrelopez
Copy link
Member

Hi @naboo could you please recreate the issue and send back to us a zip file of the following folder: storage/logs? please send the file to support@enupal.com

@naboo
Copy link

naboo commented Mar 6, 2024

So I just replied to my suppor ticket. The issue is related to the character set not being supported in the DB. So it's technically not a plugin issue more then a DB issue.

If you try and store translations with characters not supported by the DB table this row fails:

$connection->createCommand()->upsert($messageTable, $rowToInsert)->execute();

For me personally it was an emoji in the translation.

To store the emoji \xF0\x9F\x91\x89 (or any other emoji) in a MySQL column, the column should use a character set that supports 4-byte characters. The recommended character set for this purpose is utf8mb4.

However I can't seem to get the column conversion to utf8mb4 to work at the moment. I can verify the bug though if I just remove the emoji from the translation everything works fine. I'll keep updating this post if I solve it by the end of my day (or if you beat me to it!).

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

No branches or pull requests

4 participants