Elixir-Phoenix-函数:erl_posix_msg.message / 1未定义

问题描述 投票:1回答:1

[我有两台服务器运行一个非常简单的Phoenix框架API,并且每隔一周左右,其中一台服务器会因出现此错误而异常运行并抛出502。

15:35:08.260 [error] 'File operation error: emfile. Target: /usr/lib/erlang/lib/stdlib-3.2/ebin/erl_posix_msg.beam. Function: get_file. Process: code_server.'

15:35:08.323 [error] 'File operation error: emfile. Target: erl_posix_msg.beam. Function: get_file. Process: code_server.'

15:35:08.324 [error] GenServer #PID<0.6569.17> terminating
** (UndefinedFunctionError) function :erl_posix_msg.message/1 is undefined (module :erl_posix_msg is not available)
    (stdlib) :erl_posix_msg.message(:emfile)
    (redix) lib/redix.ex:393: Redix.format_error/1
    (redix) lib/redix/connection.ex:108: Redix.Connection.connect/2
    (connection) lib/connection.ex:622: Connection.enter_connect/5
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: nil
State: %Redix.Connection{backoff_current: nil, opts: [socket_opts: [], sync_connect: false, backoff_initial: 500, backoff_max: 30000, log: [disconnection: :error, failed_connection: :error, reconnection: :info], exit_on_disconnection: false, host: "redis.host.not", port: 6379], receiver: nil, shared_state: nil, socket: nil}

15:35:08.324 [error] Ranch protocol #PID<0.6568.17> (:cowboy_protocol) of listener Auth.Endpoint.HTTP terminated
** (exit) an exception was raised:
    ** (UndefinedFunctionError) function :erl_posix_msg.message/1 is undefined (module :erl_posix_msg is not available)
        (stdlib) :erl_posix_msg.message(:emfile)
        (redix) lib/redix.ex:393: Redix.format_error/1
        (redix) lib/redix/connection.ex:108: Redix.Connection.connect/2
        (connection) lib/connection.ex:622: Connection.enter_connect/5
        (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3

如果我只是重新启动phoenix服务器,请重新启动。显然,这不是可扩展的解决方案,但是我正在努力诊断正在发生的事情。

任何帮助都会很甜蜜。

谢谢

erlang elixir phoenix-framework gen-server beam
1个回答
0
投票

阅读OTP erl_posix_msg模块,您可以看到它只是“太多打开文件”的代码。

© www.soinside.com 2019 - 2024. All rights reserved.