bootsnap: Errno::ENOENT - No such file or directory - bs_fetch:atomic_write_cache_file:rename
Hi! We’ve recently started to use Bootsnap (1.3.0) and we just noticed this error pop up in our Sentry account for our staging server:
Errno::ENOENT
No such file or directory - bs_fetch:atomic_write_cache_file:rename
bootsnap/compile_cache/iseq.rb in fetch at line 37
bootsnap/compile_cache/iseq.rb in load_iseq at line 37
bootsnap/load_path_cache/core_ext/kernel_require.rb in require at line 21
bootsnap/load_path_cache/core_ext/kernel_require.rb in block in require_with_bootsnap_lfi at line 21
bootsnap/load_path_cache/loaded_features_index.rb in register at line 65
bootsnap/load_path_cache/core_ext/kernel_require.rb in require_with_bootsnap_lfi at line 20
bootsnap/load_path_cache/core_ext/kernel_require.rb in require at line 29
Both the caller and the required file are from gems. We run Rails on a single-threaded/single-process Linux environment inside Docker. So far it has only happened once.
I don’t have enough knowledge about Bootsnap to dive deeper into the issue, but I’m happy to provide any other information I can. However, we haven’t been able to reproduce it.
Thank you!
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 23
- Comments: 20 (2 by maintainers)
Commits related to this issue
- Fix issue with failed tests due to Docker Compose https://github.com/Shopify/bootsnap/issues/177 — committed to Kovah/KVH-Tools by Kovah 4 years ago
- Ensure that temporary file is used only by one process mkstemp(3) ensures that a unique file is created, but in the previous implementation, there's a possibility that a process uses the temporary fi... — committed to abicky/bootsnap by abicky 4 years ago
- Ensure that temporary file is used only by one process mkstemp(3) ensures that a unique file is created, but in the previous implementation, there's a possibility that a process uses the temporary fi... — committed to abicky/bootsnap by abicky 4 years ago
- Do not mount the tmp directory We were getting the following error when running tests An error occurred while loading ./spec/controllers/subnets_controller_spec.rb. Failure/Error: require File.expan... — committed to ministryofjustice/staff-device-dns-dhcp-admin by deleted user 4 years ago
- Do not mount the tmp directory We were getting the following error when running tests An error occurred while loading ./spec/controllers/subnets_controller_spec.rb. Failure/Error: require File.expan... — committed to ministryofjustice/staff-device-dns-dhcp-admin by deleted user 4 years ago
- fix https://github.com/Shopify/bootsnap/issues/177 — committed to umihico/rails-demo by umihico 3 years ago
- fixup! fix https://github.com/Shopify/bootsnap/issues/177 — committed to umihico/rails-demo by umihico 3 years ago
- Try precompiling assets before starting server (see https://github.com/Shopify/bootsnap/issues/177#issuecomment-491711481) — committed to BerkeleyLibrary/avplayer by dmolesUC 5 years ago
Yea, so our issue was two machines that were trying to load the
/app/tmpdirectory at the same time, we solved it with the following docker-compose config:I’ve been getting this error too. Using docker-compose.
Not sure if this will help, but I found the same issue running a Rails app in Docker. The app has two containers (
webandworker), and I think trying to run them at the same time was causing issues.So far, I’ve managed to get workaround it by removing bootsnap cache files and restarting the containers separately:
I faced this issue as well. It happens on the blank
tmpdirectory, where both theappandsidekiqare loading at the same time on my docker container. Once there’s a cache frombootsnap, the issue seems to be gone.For the time being, a combination of:
and
worked for me. My gut is telling me that @lukaso is on to something with the race condition but this work around is ok for now.
I deploy the Rails app to docker and I don’t mount tmp directory but the problem still occurs.
now this is closed, but no release has been made
Juste restart Docker engine.