-
Notifications
You must be signed in to change notification settings - Fork 32
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
Intermittent same queries is taking more time. #280
Comments
Please share some code to show how you're using the connection. Too many concurrent requests or too much data left unread on the connection may lead to SQL server closing the connection. |
DB Client Config @bean
} @bean DB client Implementation @Autowired public Mono<Optional> getSampleDetails(String bcode) { |
Java version: Java 17
DB Packages:
runtimeOnly 'io.r2dbc:r2dbc-mssql:1.0.2.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc'
Implementation DB config Snippet
` ConnectionFactoryOptions baseOptions = ConnectionFactoryOptions.parse(
"r2dbc:sqlserver://" + url);
ConnectionFactoryOptions ob = ConnectionFactoryOptions.builder().from(baseOptions)
.option(USER, user)
.option(PASSWORD, password)
.build();
`
We are facing 2 intermittent issues.
1- Intermittently queries is taking more time and it is exceeding 1 sec timeout. Simple select query normally returning in 20ms but its P95 is 500ms. We are getting following exception.
TimeoutException: Did not observe any item or terminal signal within 1000ms in 'Mono.map ⇢ at com.thyrocare.laboms.dao.TechsoDbDao.getSampleDetails(TechsoDbDao.java:42)' (and no fallback has been configured)
2- Sometimes it is closing connections. We are getting MssqlconnectionclosedException.
ReactorNettyClient$MssqlConnectionClosedException: Connection closed
Pls suggest what we can do resolve these issues.
The text was updated successfully, but these errors were encountered: