stavro / arc

:paperclip: Flexible file upload and attachment library for Elixir
1.16k stars 210 forks source link

Arc sometimes does not save files #281

Open DmitryKK opened 5 years ago

DmitryKK commented 5 years ago

Environment

I have very weird situation with arc. I use arc_ecto and have a model with an attachment field. My genserver (1) passes the remote path to another genserver (2) (sync) where the message is saved. Arc uploads file by remote path. My genserver (2) replies to the genserver (1) that the message was successfully uploaded and saved in database. But the file is missing in my storage dir. This behavior does not always occur. I don't have a clear reproduction algorithm. The only thing I noticed is that the genserver (1) always gets an error before this:

2019-06-12 15:54:17.037 [error] Agala.Bot.Handler :"#Agala.Bot.Handler<name>" received unexpected message in handle_info/2: {#Reference<0.4156968029.1152122882.243458>, :ok}

2019-06-12 15:54:17.037 [error] Agala.Bot.Handler :"#Agala.Bot.Handler<name>" received unexpected message in handle_info/2: {:DOWN, #Reference<0.4156968029.1152122882.243458>, :process, #PID<0.8292.0>, :normal}

What's going on? Please help me.