ami
December 27, 2022, 5:42pm
1
Hi, everybody
So today I published a rather big workspace, and as a result I got asked twice:
the remote server responded with an error (status 429 Too Many Requests): You have published too many crates in a short period of time. Please try again after Tue, 27 Dec 2022 17:25:13 GMT or email help@crates.io to have your limit increased.
First of all my most sincere apology to anyone I inconvenienced publishing so many crates, I'm so sorry. I will try to never publish so many crates again on one go. And if i find myself in the need I'll contact the crates.io team beforehand.
I still some questions. Why is it unreasonable to try an publish eight packages in the workspace, one after the other? Do teams with really big projects like tokio have to coordinate for this kind of thing?
Maybe I have oversplitted my code. Is there a general rule for deciding when to split a piece of code in a workspace? I splitted at what I thought were open and closed pieces of code. Are there better criteria?
Thanks for any answers and again I'm sorry for any inconvenience I may have caused.
Ami
bjorn3
December 27, 2022, 5:49pm
2
According to the source code the following rate limiting is used (crates.io/nginx.conf.erb at 6bf32bab3afc21d18b307168ae78b6b07585ebd7 · rust-lang/crates.io · GitHub )
limit_req_zone $remote_addr zone=publish:10m rate=1r/m;
limit_req zone=publish burst=30 nodelay;
which means 1 publish per minute is allowed with a burst size of 30 published crates.
Publishing just 8 crates at a time shouldn't cause a rate limiting as far as I understand.
alice
December 27, 2022, 5:52pm
3
It's not a problem to publish many packages as long as you do so for legitimate reasons. Just wait for the time limit to expire, then publish the rest of them.
There's also been earlier discussion about this in the crates.io
repository:
opened 05:20AM - 03 Mar 19 UTC
closed 04:48PM - 05 Feb 21 UTC
A-publish
When publishing UNIC 0.9.0, there's a sequence of `cargo update` and `cargo publ… ish` for all the components (28 of them).
Near the end of publish, at `cargo publish --verbose --manifest-path unic/emoji/char/Cargo.toml`, I got the following error:
```
Executing cargo publish --verbose --manifest-path unic/emoji/char/Cargo.toml
Updating crates.io index
Packaging unic-emoji-char v0.9.0 (/Users/behnam/code/open-i18n/rust-unic/unic/emoji/char)
Archiving Cargo.toml
Archiving src/emoji.rs
Archiving src/emoji_component.rs
Archiving src/emoji_modifier.rs
Archiving src/emoji_modifier_base.rs
Archiving src/emoji_presentation.rs
Archiving src/emoji_version.rs
Archiving src/lib.rs
Archiving src/pkg_info.rs
Archiving tables/emoji.rsv
Archiving tables/emoji_component.rsv
Archiving tables/emoji_modifier.rsv
Archiving tables/emoji_modifier_base.rsv
Archiving tables/emoji_presentation.rsv
Archiving tables/emoji_version.rsv
Archiving tests/emoji_version_tests.rs
Archiving .cargo_vcs_info.json
Verifying unic-emoji-char v0.9.0 (/Users/behnam/code/open-i18n/rust-unic/unic/emoji/char)
Updating crates.io index
Compiling unic-char-range v0.9.0
Compiling unic-common v0.9.0
Running `rustc --edition=2018 --crate-name unic_char_range /Users/behnam/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' -C metadata=580cacac1f2fc887 -C extra-filename=-580cacac1f2fc887 --out-dir /Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/deps -L dependency=/Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/deps --cap-lints allow`
Running `rustc --edition=2018 --crate-name unic_common /Users/behnam/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-common-0.9.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' -C metadata=4b06076d4a09200d -C extra-filename=-4b06076d4a09200d --out-dir /Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/deps -L dependency=/Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/deps --cap-lints allow`
Compiling unic-ucd-version v0.9.0
Running `rustc --edition=2018 --crate-name unic_ucd_version /Users/behnam/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-ucd-version-0.9.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=c925fe73a5f2ecc8 -C extra-filename=-c925fe73a5f2ecc8 --out-dir /Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/deps -L dependency=/Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/deps --extern unic_common=/Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/deps/libunic_common-4b06076d4a09200d.rlib --cap-lints allow`
Compiling unic-char-property v0.9.0
Running `rustc --edition=2018 --crate-name unic_char_property /Users/behnam/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-property-0.9.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=916399f60dbb4e87 -C extra-filename=-916399f60dbb4e87 --out-dir /Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/deps -L dependency=/Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/deps --extern unic_char_range=/Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/deps/libunic_char_range-580cacac1f2fc887.rlib --cap-lints allow`
Compiling unic-emoji-char v0.9.0 (/Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0)
Running `rustc --edition=2018 --crate-name unic_emoji_char src/lib.rs --color always --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=20bfae06c68c7d3c -C extra-filename=-20bfae06c68c7d3c --out-dir /Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/deps -C incremental=/Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/incremental -L dependency=/Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/deps --extern unic_char_property=/Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/deps/libunic_char_property-916399f60dbb4e87.rlib --extern unic_char_range=/Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/deps/libunic_char_range-580cacac1f2fc887.rlib --extern unic_ucd_version=/Users/behnam/code/open-i18n/rust-unic/target/package/unic-emoji-char-0.9.0/target/debug/deps/libunic_ucd_version-c925fe73a5f2ecc8.rlib`
Finished dev [unoptimized + debuginfo] target(s) in 1.71s
Uploading unic-emoji-char v0.9.0 (/Users/behnam/code/open-i18n/rust-unic/unic/emoji/char)
error: failed to get a 200 OK response, got 429
headers:
HTTP/1.1 100 Continue
HTTP/1.1 429
Connection: keep-alive
Server: nginx
Date: Sun, 03 Mar 2019 05:13:51 GMT
Content-Length: 0
Strict-Transport-Security: max-age=31536000
Via: 1.1 vegur
body:
```
The client, `cargo`, seems to not understand the response. Not sure if the server is at fault (with a bad response) or the client (with not handling the response). Anyways, reporting to investigate.
1 Like
ami
December 27, 2022, 6:10pm
6
That's exactly what I did, glad to know I won't be on a bad rustaceans list in the future
ami
December 27, 2022, 6:11pm
7
I may have violated the publishing/minute because some of the crates were rather small
system
Closed
March 27, 2023, 6:11pm
8
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.