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

S3 has 100% of misses all of the time #218

Closed
kornelski opened this issue Jan 13, 2018 · 4 comments
Closed

S3 has 100% of misses all of the time #218

kornelski opened this issue Jan 13, 2018 · 4 comments

Comments

@kornelski
Copy link
Member

How can I diagnose issues with sccache apparently not working with S3?

export SCCACHE_BUCKET=…
export AWS_ACCESS_KEY_ID=…
export AWS_SECRET_ACCESS_KEY=…
export RUSTC_WRAPPER=$(which sccache)
cargo clean
cargo build --release
cargo clean
cargo build --release

If I do the above without setting up S3, I get cache hits on local disk.

However, with S3 enabled I only get cache misses. The S3 bucket remains completely empty.

How can I diagnose what went wrong?

Compile requests 233
Compile requests executed 205
Cache hits 0
Cache misses 205
Cache timeouts 0
Cache read errors 0
Forced recaches 0
Cache write errors 181
Compilation failures 0
Cache errors 0
Non-cacheable compilations 0
Non-cacheable calls 28
Non-compilation calls 0
Unsupported compiler calls 0
Average cache write 0.000 s
Average cache read miss 6.322 s
Average cache read hit 0.000 s
Cache location S3, bucket: Bucket(name=…, base_url=http://….s3.amazonaws.com/)

@kornelski
Copy link
Member Author

kornelski commented Jan 13, 2018

RUST_LOG=sccache=trace sccache rustc …
cat sccache.log

@luser
Copy link
Contributor

luser commented Jan 14, 2018

Did you get this sorted out? We have an existing issue on file about this: #45

Right now it's hard to diagnose if your S3 configuration isn't correct.

@kornelski
Copy link
Member Author

kornelski commented Jan 14, 2018

Yes, I've eventually found the log, and that PUT requests were failing. It turned out to be permissions problem (I can't believe I had to write custom JSON in AWS to set up such a basic thing as protected s3 bucket).

It'd be great if you could add proper diagnostic for it, e.g. try making a PUT request at server startup and fail loudly if that request is rejected.

@turbo
Copy link

turbo commented Oct 2, 2019

I seond @kornelski 's suggestion.

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

No branches or pull requests

3 participants