我有两个服务器运行一个非常简单的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
如果我重新启动凤凰服务器,繁荣,一切都会重新开始工作。显然,这不是一个可扩展的解决方案,但我正在努力诊断正在发生的事情。
任何帮助都会很好。
由于