programing

커뮤니케이션예외:연결이 실패했을 때 응용 프로그램이 결과를 스트리밍하고 있었습니다.서버에서 'net_write_timeout' 값을 올리는 것을 고려합니다.

lastmoon 2023. 8. 30. 22:01
반응형

커뮤니케이션예외:연결이 실패했을 때 응용 프로그램이 결과를 스트리밍하고 있었습니다.서버에서 'net_write_timeout' 값을 올리는 것을 고려합니다.

저는 Mariadb 5.5와 함께 Slick(3.3.2) 스트리밍을 사용하고 있습니다.몇 분 후에 다음 오류가 발생하여 깨지기 시작합니다.

Connection com.mysql.jdbc.JDBC4Connection@105f8738 marked as broken because of SQLSTATE(08S01), ErrorCode(0)"
181773:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Application was streaming results when the connection failed. Consider raising value of 'net_write_timeout' on the server.
181774- at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_312]
181775- at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_312]
181776- at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_312]
181777- at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_312]
181778- at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) ~[mysql.mysql-connector-java-5.1.41.jar:5.1.41]
181779: at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:989) ~[mysql.mysql-connector-java-5.1.41.jar:5.1.41]
181780- at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3559) ~[mysql.mysql-connector-java-5.1.41.jar:5.1.41]
181781- at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3459) ~[mysql.mysql-connector-java-5.1.41.jar:5.1.41]
181782- at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3900) ~[mysql.mysql-connector-java-5.1.41.jar:5.1.41]
181783- at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:873) ~[mysql.mysql-connector-java-5.1.41.jar:5.1.41]
181784- at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1996) ~[mysql.mysql-connector-java-5.1.41.jar:5.1.41]
181785- at com.mysql.jdbc.RowDataDynamic.nextRecord(RowDataDynamic.java:374) ~[mysql.mysql-connector-java-5.1.41.jar:5.1.41]
181786- at com.mysql.jdbc.RowDataDynamic.next(RowDataDynamic.java:354) ~[mysql.mysql-connector-java-5.1.41.jar:5.1.41]
181787- at com.mysql.jdbc.ResultSetImpl.next(ResultSetImpl.java:6327) ~[mysql.mysql-connector-java-5.1.41.jar:5.1.41]
181788- at com.zaxxer.hikari.pool.HikariProxyResultSet.next(HikariProxyResultSet.java) ~[com.zaxxer.HikariCP-3.2.0.jar:?]
181789- at slick.jdbc.PositionedResult.nextRow(PositionedResult.scala:26) ~[com.typesafe.slick.slick_2.12-3.3.2.jar:?]
181790- at slick.jdbc.PositionedResultIterator.fetchNext(PositionedResult.scala:175) ~[com.typesafe.slick.slick_2.12-3.3.2.jar:?]
181791- at slick.util.ReadAheadIterator.update(ReadAheadIterator.scala:28) ~[com.typesafe.slick.slick_2.12-3.3.2.jar:?]
181792- at slick.util.ReadAheadIterator.hasNext(ReadAheadIterator.scala:34) ~[com.typesafe.slick.slick_2.12-3.3.2.jar:?]
181793- at slick.util.ReadAheadIterator.hasNext$(ReadAheadIterator.scala:33) ~[com.typesafe.slick.slick_2.12-3.3.2.jar:?]
181794- at slick.jdbc.PositionedResultIterator.hasNext(PositionedResult.scala:167) ~[com.typesafe.slick.slick_2.12-3.3.2.jar:?]
181795- at slick.jdbc.StreamingInvokerAction.emitStream(StreamingInvokerAction.scala:31) ~[com.typesafe.slick.slick_2.12-3.3.2.jar:?]
181796- at slick.jdbc.StreamingInvokerAction.emitStream$(StreamingInvokerAction.scala:26) ~[com.typesafe.slick.slick_2.12-3.3.2.jar:?]

net_write_timeout 값을 90초에서 180초로 변경하려고 했지만 도움이 되지 않습니다.어떤 도움이라도 주시면 감사하겠습니다.

예를 들어 추가해야 할 수 있습니다."netTimeoutForStreamingResults=28800"스트리밍 결과를 활성화하는 경우 연결 문자열에 포함됩니다.오버라이드됩니다."net_write_timeout"서버 측의 값, The"netTimeoutForStreamingResults"기본값은 600초입니다.mysql/connect/j/5.1.47

언급URL : https://stackoverflow.com/questions/71350067/communicationsexception-application-was-streaming-results-when-the-connection-f

반응형