monorepo: [bug] Cannot run `npx @inlang/cli machine translate`

Problem

Machine translations failed

image

Expected behavior

CLI should translate missing IDs

Reproduction

  1. run npx @inlang/cli machine translate --force --project ./project.inlang
  2. see error

Other information

No response

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 21 (13 by maintainers)

Most upvoted comments

I debugged this today - The root cause of this error apper to be too many concurrent rpcs (fetch requests).

Projects with more messages generate correspondingly more rpcs, because we send a request per message, irrespective of whether it needs to be translated or not.

I will push a quick CLI PR to limit concurrent requests, and we can follow up with an issue to skip rpcs for messages that don’t need translation.

I’ve been working with the machine translate cli today and this error is happening randomly in my setup. I thought it was the volume of messages because I’m trying test a larger set of message (hence no issue filed yet) My suspecion is that there is rate limiting - sometimes I can translate 100 messages, and then 0. I’ll try to instrument the proxy to see why the fetches are failing.

It’s working now! 🎉

Summary of call with @buhodev: Thanks for the call 😊🙏 JSON is looking fine, fetch fails randomly on messages. @buhodev Could possibly share the JSON (10 message) content which fails for you for us to further investigate?