Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network errors, we are looking for feeback/advice #21

Open
moctes opened this issue Sep 26, 2024 · 0 comments
Open

Network errors, we are looking for feeback/advice #21

moctes opened this issue Sep 26, 2024 · 0 comments

Comments

@moctes
Copy link

moctes commented Sep 26, 2024

Hi,

I don't know if this report is actually a problem, rather we are trying to get feedback to see what we can do to prevent it.

First the context:
We have an application that is installed on premise to our client, the application runs on a linux server, the Firebird server is running on another server that uses Windows Server, it seems that both computers are in a virtual environment created with VMWare ESXi, and although we are using Elixir and not Erlang directly we are making the report here because the stack shows the error in efirebirdsql_socket we thought it would be better to ask the question here.

Now the problem:
We are getting some connection errors with Firebird, we had them before in a scenario where the client had the database server in a remote branch and the latency was causing us problems with queries that involved more than 1K of data, however currently both the application and the Firebird server are in the same physical location and the problems seem to have disappeared, but yesterday we had a similar problem, which occurred only once and no more, so we are investigating if there is something we can do to prevent these errors, since it seems to occur at the TCP/IP level we do not know if there is some adjustment for the driver that makes it more resilient, or what others do in scenarios like this.

This is the part of the log that we have about the error on the server:

sep 25 19:25:29 dbto lxweb[96877]: 19:25:29.611 [error] ** State machine #PID<0.2251.0> terminating
sep 25 19:25:29 dbto lxweb[96877]: ** Reason for termination ==
sep 25 19:25:29 dbto lxweb[96877]: ** (DBConnection.ConnectionError) client #PID<0.2583.0> stopped: ** (ErlangError) Erlang error: {:badrecord, :conn}
sep 25 19:25:29 dbto lxweb[96877]:     (efirebirdsql 0.9.10) /home/myuser/elixir/1.17/myphxapp/deps/efirebirdsql/src/efirebirdsql_socket.erl:21: :efirebirdsql_socket.recv/2
sep 25 19:25:29 dbto lxweb[96877]:     (efirebirdsql 0.9.10) /home/myuser/elixir/1.17/myphxapp/deps/efirebirdsql/src/efirebirdsql_op.erl:510: :efirebirdsql_op.get_response/1
sep 25 19:25:29 dbto lxweb[96877]:     (efirebirdsql 0.9.10) /home/myuser/elixir/1.17/myphxapp/deps/efirebirdsql/src/efirebirdsql_protocol.erl:234: :efirebirdsql_protocol.execute/4
sep 25 19:25:29 dbto lxweb[96877]:     (firebirdex 0.3.11) lib/firebirdex/connection.ex:95: Firebirdex.Connection.handle_execute/4
sep 25 19:25:29 dbto lxweb[96877]:     (db_connection 2.7.0) lib/db_connection/holder.ex:354: DBConnection.Holder.holder_apply/4
sep 25 19:25:29 dbto lxweb[96877]:     (db_connection 2.7.0) lib/db_connection.ex:1558: DBConnection.run_execute/5
sep 25 19:25:29 dbto lxweb[96877]:     (db_connection 2.7.0) lib/db_connection.ex:1653: DBConnection.run/6
sep 25 19:25:29 dbto lxweb[96877]:     (db_connection 2.7.0) lib/db_connection.ex:772: DBConnection.parsed_prepare_execute/5
sep 25 19:25:29 dbto lxweb[96877]: 19:25:29.610 [error] GenServer #PID<0.2583.0> terminating
sep 25 19:25:29 dbto lxweb[96877]: ** (stop) {:badrecord, :conn}
sep 25 19:25:29 dbto lxweb[96877]:     (efirebirdsql 0.9.10) /home/myuser/elixir/1.17/myphxapp/deps/efirebirdsql/src/efirebirdsql_socket.erl:21: :efirebirdsql_socket.recv/2
sep 25 19:25:29 dbto lxweb[96877]:     (efirebirdsql 0.9.10) /home/myuser/elixir/1.17/myphxapp/deps/efirebirdsql/src/efirebirdsql_op.erl:510: :efirebirdsql_op.get_response/1
sep 25 19:25:29 dbto lxweb[96877]:     (efirebirdsql 0.9.10) /home/myuser/elixir/1.17/myphxapp/deps/efirebirdsql/src/efirebirdsql_protocol.erl:234: :efirebirdsql_protocol.execute/4
sep 25 19:25:29 dbto lxweb[96877]:     (firebirdex 0.3.11) lib/firebirdex/connection.ex:95: Firebirdex.Connection.handle_execute/4
sep 25 19:25:29 dbto lxweb[96877]:     (db_connection 2.7.0) lib/db_connection/holder.ex:354: DBConnection.Holder.holder_apply/4
sep 25 19:25:29 dbto lxweb[96877]:     (db_connection 2.7.0) lib/db_connection.ex:1558: DBConnection.run_execute/5
sep 25 19:25:29 dbto lxweb[96877]:     (db_connection 2.7.0) lib/db_connection.ex:1653: DBConnection.run/6
sep 25 19:25:29 dbto lxweb[96877]:     (db_connection 2.7.0) lib/db_connection.ex:772: DBConnection.parsed_prepare_execute/5
sep 25 19:25:29 dbto lxweb[96877]: Last message: %Phoenix.Socket.Message{topic: "lv:phx-F_iTNO3YC7FdzD4B", event: "event", payload: %{"cid" => 4, "event" => "save", "type" => "form", "value" => "tarjetas_td%5Bcard_id%5D=0191b4a7-a09>
sep 25 19:25:29 dbto lxweb[96877]: 19:25:29.612 [error] :gen_statem #PID<0.2251.0> terminating
sep 25 19:25:29 dbto lxweb[96877]: ** (stop) an exception was raised:
sep 25 19:25:29 dbto lxweb[96877]:     ** (DBConnection.ConnectionError) client #PID<0.2583.0> stopped: ** (ErlangError) Erlang error: {:badrecord, :conn}
sep 25 19:25:29 dbto lxweb[96877]:     (efirebirdsql 0.9.10) /home/myuser/elixir/1.17/myphxapp/deps/efirebirdsql/src/efirebirdsql_socket.erl:21: :efirebirdsql_socket.recv/2
sep 25 19:25:29 dbto lxweb[96877]:     (efirebirdsql 0.9.10) /home/myuser/elixir/1.17/myphxapp/deps/efirebirdsql/src/efirebirdsql_op.erl:510: :efirebirdsql_op.get_response/1
sep 25 19:25:29 dbto lxweb[96877]:     (efirebirdsql 0.9.10) /home/myuser/elixir/1.17/myphxapp/deps/efirebirdsql/src/efirebirdsql_protocol.erl:234: :efirebirdsql_protocol.execute/4
sep 25 19:25:29 dbto lxweb[96877]:     (firebirdex 0.3.11) lib/firebirdex/connection.ex:95: Firebirdex.Connection.handle_execute/4
sep 25 19:25:29 dbto lxweb[96877]:     (db_connection 2.7.0) lib/db_connection/holder.ex:354: DBConnection.Holder.holder_apply/4
sep 25 19:25:29 dbto lxweb[96877]:     (db_connection 2.7.0) lib/db_connection.ex:1558: DBConnection.run_execute/5
sep 25 19:25:29 dbto lxweb[96877]:     (db_connection 2.7.0) lib/db_connection.ex:1653: DBConnection.run/6
sep 25 19:25:29 dbto lxweb[96877]:     (db_connection 2.7.0) lib/db_connection.ex:772: DBConnection.parsed_prepare_execute/5
sep 25 19:25:29 dbto lxweb[96877]:         (db_connection 2.7.0) lib/db_connection/connection.ex:187: DBConnection.Connection.handle_event/4
sep 25 19:25:29 dbto lxweb[96877]:         (stdlib 6.0) gen_statem.erl:3115: :gen_statem.loop_state_callback/11
sep 25 19:25:29 dbto lxweb[96877]:         (stdlib 6.0) proc_lib.erl:340: :proc_lib.wake_up/3
sep 25 19:25:29 dbto lxweb[96877]:     (stdlib 6.0) gen_statem.erl:3242: :gen_statem.loop_state_callback_result/11
sep 25 19:25:29 dbto lxweb[96877]:     (stdlib 6.0) proc_lib.erl:340: :proc_lib.wake_up/3
sep 25 19:25:29 dbto lxweb[96877]: Queue: [cast: {:stop, #Reference<0.2904180523.731774978.190210>, %DBConnection.ConnectionError{message: "client #PID<0.2583.0> stopped: ** (ErlangError) Erlang error: {:badrecord, :conn}\n    (efir>

Any help will be greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant