Buckitup-chat / chat

Web app of chat. It would be integrated into Nerves to be served on Raspberry Pi
GNU General Public License v3.0
5 stars 3 forks source link

Queue should not stuck getting :demand #618

Closed sergey-lukianov closed 7 months ago

sergey-lukianov commented 8 months ago

Writer fails and terminates linked process

18:45:16.720 [error] GenServer Chat.Db.CargoDb.Writer terminating
** (stop) exited in: GenServer.call(Chat.Db.CargoDb.Queue, :demand, 5000)
    ** (EXIT) time out
    (elixir 1.15.5) lib/gen_server.ex:1074: GenServer.call/3
    (chat 0.1.0) lib/chat/db/pipeline/writer.ex:40: Chat.Db.Pipeline.Writer.demand_queue/1
    (chat 0.1.0) lib/chat/db/pipeline/writer_process.ex:44: Chat.Db.Pipeline.WriterProcess.handle_continue/2
    (stdlib 5.1.1) gen_server.erl:1067: :gen_server.try_handle_continue/3
    (stdlib 5.1.1) gen_server.erl:977: :gen_server.loop/7
    (stdlib 5.1.1) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
Last message: {:continue, :demand}
State: {:w_state, Chat.Db.CargoDb, "/root/media/sdb1/cargo_db/v.9_files", Chat.Db.CargoDb.Queue, Chat.Db.CargoDb.Compactor, 0, #Reference<0.870037056.268697604.83530>}

18:45:21.725 [error] GenServer Chat.Db.CargoDb.Writer terminating
** (stop) exited in: GenServer.call(Chat.Db.CargoDb.Queue, :demand, 5000)
    ** (EXIT) time out
    (elixir 1.15.5) lib/gen_server.ex:1074: GenServer.call/3
    (chat 0.1.0) lib/chat/db/pipeline/writer.ex:40: Chat.Db.Pipeline.Writer.demand_queue/1
    (chat 0.1.0) lib/chat/db/pipeline/writer_process.ex:44: Chat.Db.Pipeline.WriterProcess.handle_continue/2
    (stdlib 5.1.1) gen_server.erl:1067: :gen_server.try_handle_continue/3
    (stdlib 5.1.1) gen_server.erl:977: :gen_server.loop/7
    (stdlib 5.1.1) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
Last message: {:continue, :demand}
State: {:w_state, Chat.Db.CargoDb, "/root/media/sdb1/cargo_db/v.9_files", Chat.Db.CargoDb.Queue, Chat.Db.CargoDb.Compactor, 0, nil}