Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Translation] [Crowdin] Use synchronous HTTP requests when reading the Crowdin API#48109

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Kocal wants to merge1 commit intosymfony:5.4fromKocal:fix/translation-crowdin-read-too-many-requests
Closed

[Translation] [Crowdin] Use synchronous HTTP requests when reading the Crowdin API#48109

Kocal wants to merge1 commit intosymfony:5.4fromKocal:fix/translation-crowdin-read-too-many-requests

Conversation

@Kocal
Copy link
Member

@KocalKocal commentedNov 4, 2022
edited
Loading

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix #...
LicenseMIT
Doc PRsymfony/symfony-docs#...

Hi!

We are migrating to Crowdin and we faced429 Too Many Requests issues when pull translations, because we have a lot of locales and domains in our application, andCrowdin limits 20 parallel requests per account.

image

This is like#44416, but for Crowdin :)

Thanks.

@carsonbotcarsonbot added this to the5.4 milestoneNov 4, 2022
@carsonbotcarsonbot changed the title[Translation][Crowdin] Use synchronous HTTP requests when reading the Crowdin API[Translation] [Crowdin] Use synchronous HTTP requests when reading the Crowdin APINov 4, 2022
@stof
Copy link
Member

stof commentedNov 4, 2022

If the limit is 20 concurrent requests and not 1, we don't need to use synchronous requests. We only need to limit concurrency to 20.

@nicolas-grekas
Copy link
Member

nicolas-grekas commentedNov 4, 2022
edited
Loading

Can you try forcing HTTP/1.1? Because the default is to open max 6 connections the remote hosts. If we hit the 20 limit, it means we're using HTTP/2. If that works, then the fix could be just to force thehttp_version in the constructor:
$this->client = $client->withOoptions(['http_version' => '1.1']);

@Kocal
Copy link
MemberAuthor

Thanks for your suggestions, putting a limit of 6 or 20 concurrent requests won't really work in our case, since we pull translations locally, in our CI, and when deploying our app in review apps / staging / production.

Putting a limit of 1 would be ideal for us, this way we can be sure that we won't hit the Crowdin's concurrent requests limit across envs.

@stof
Copy link
Member

stof commentedNov 4, 2022

Maybe the provider should also wrap the client into a RetryableHttpClient

@nicolas-grekas
Copy link
Member

putting a limit of 6

Can you still give it a try? 3x6 = 18 so that might work.

@nicolas-grekas
Copy link
Member

Closing as we're likely not going with this approach. Please let us know if force http 1.1 is enough in practice.

welcoMattic and Kocal reacted with thumbs up emoji

@Kocal
Copy link
MemberAuthor

Yeah I gonna try to force HTTP 1.1, or playing with max host connections option ASAP

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

4 participants

@Kocal@stof@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp