# How to deal with multiple processes trying to load the same file (and crash)?

**URL:** https://discourse.julialang.org/t/how-to-deal-with-multiple-processes-trying-to-load-the-same-file-and-crash/46005
**Category:** Data
**Tags:** question
**Created:** [September 3, 2020, 1:12pm UTC](https://discourse.julialang.org/t/how-to-deal-with-multiple-processes-trying-to-load-the-same-file-and-crash/46005 "2020-09-03T13:12:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![volkerkarle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/volkerkarle/32/14143_2.png) [@volkerkarle](https://discourse.julialang.org/u/volkerkarle)
#### Post date: [September 3, 2020, 1:12pm UTC](https://discourse.julialang.org/t/how-to-deal-with-multiple-processes-trying-to-load-the-same-file-and-crash/46005/1 "2020-09-03T13:12:19Z")

</div>

hey folks,

Right now I have the issue that multiple jobs on a cluster try to load the same data (my data is saved using JLD) and there is a problem with the disk, as a result the jobs fail. How can I deal with this issue? The jobs are a series of scientific calculations which save intermediate results, which again can be reused by other jobs. Sometimes these collisions cause the jobs to crash. Is there maybe already a package for that? I imagine something like a database server, where the jobs fetch their data simultaneously (however, note that I do not have admin rights on the cluster).

Best,

v.

---

<div class="post-metadata">

### Author: ![quinnj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quinnj/32/11_2.png) [@quinnj](https://discourse.julialang.org/u/quinnj)
#### Post date: [September 3, 2020, 2:33pm UTC](https://discourse.julialang.org/t/how-to-deal-with-multiple-processes-trying-to-load-the-same-file-and-crash/46005/2 "2020-09-03T14:33:27Z")

</div>

I’d probably try to use a proper database like SQLite.jl or MySQL.jl (MySQL.jl is only a client, you’d have to manage/start the server as a separate process).

---

<div class="post-metadata">

### Author: ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)
#### Post date: [September 3, 2020, 2:40pm UTC](https://discourse.julialang.org/t/how-to-deal-with-multiple-processes-trying-to-load-the-same-file-and-crash/46005/3 "2020-09-03T14:40:13Z")

</div>

readonly shouldn’t be a issue right? this is pretty common is research where you have some read-only files hosted in shared filesystem.

---

<div class="post-metadata">

### Author: ![volkerkarle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/volkerkarle/32/14143_2.png) [@volkerkarle](https://discourse.julialang.org/u/volkerkarle)
#### Post date: [September 3, 2020, 2:52pm UTC](https://discourse.julialang.org/t/how-to-deal-with-multiple-processes-trying-to-load-the-same-file-and-crash/46005/4 "2020-09-03T14:52:14Z")

</div>

Exactly, read-only is sufficient
