Error "An I/O error occurred while sending to the backend" Is Reported During Service Execution
Symptom
Error "An I/O error occurred while sending to the backend" is reported during service execution on a client connected to GaussDB(DWS).
Possible Causes
The client is disconnected from the database. The disconnection may be one of the following two cases:
- Disconnected at the database side.
After the database is disconnected, if there are applications depend on the connection running, this error will be reported. The possible causes are as follows:
- The CN process restarts unexpectedly.
- The session times out.
- A user manually runs a command to terminate the session.
- Disconnected at the client side.
Handling Procedure
If the disconnection occurs at the database side. The handling methods corresponding to the preceding causes are as follows:
- Run the following command to check whether the CN process restarts unexpectedly:
1
ps -eo pid,lstart,etime,cmd | grep coo
If the connection exists before the CN process is started, the connection will be disconnected after the CN process is restarted. If the service side continues to use the connection, an error is reported.
- The parameter session_timeout is set. The default value is 10 minutes. The value 0 indicates that timeout is disabled. When the session time exceeds the value of this parameter, the database automatically clears the connection. In scenarios that require long time connections. You can set session_timeout to the expected duration on the client. For details, see JDBC Error Occurs Due to session_timeout Settings.
- Check whether CN logs contain "due to".
Check whether a user manually runs the select pg_terminate_backend(pid); command to terminate the session based on the corresponding time in the log. In most cases, the session is terminated due to user operations.
1
ERROR: dn_6003_6004: abort transaction due to concurrent update test 289502.
1
FATAL: terminating connection due to administrator command
If the disconnection occurs at the client side:
If the disconnection is not at the database side, it may be at the client side.
- Check whether the timeout parameter socketTimeout is set on the client. If yes, set this parameter to a proper value.
- Check whether the disconnection is caused by network problems.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot