Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1365

java.net.SocketException: Connection reset while streaming data from MS SQL server using Alpakka Slick connector

$
0
0

Hi

I am getting the following error when reading data from MS SQL server using Alpakka slick connector using Akka Streams:
java.net.SocketException: Connection reset

It processes few records and then suddenly came up the error. Can anyone please help me with this that what can be the reason for the connection reset issue?

Code:

val db = slick.jdbc.JdbcBackend.Database.forURL(connectionString)
val fetchSize = 50000
val profile = profileName match {
  case MSSQLServer => slick.jdbc.SQLServerProfile
  case Postgres => slick.jdbc.PostgresProfile
}
implicit val session: SlickSession = SlickSession.forDbAndProfile(db, profile)
import session.profile.api._
Slick.source(sql"#$queryString".as[T](resultantType).withStatementParameters(
  fetchSize = fetchSize
))

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1365

Trending Articles