Skip to content

Commit 592fff8

Browse files
committed
fix: Buffer size error with DSL migration calls (#34905)
**/test sanity** <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/9907267253> > Commit: 954c3e7 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9907267253&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Sanity` > Spec: > <hr>Fri, 12 Jul 2024 12:00:55 UTC <!-- end of auto-generated comment: Cypress test results -->
1 parent 1b67cb6 commit 592fff8

File tree

1 file changed

+6
-0
lines changed
  • app/server/appsmith-server/src/main/java/com/appsmith/server/helpers

1 file changed

+6
-0
lines changed

app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/RTSCaller.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import org.springframework.http.client.reactive.ReactorClientHttpConnector;
99
import org.springframework.stereotype.Component;
1010
import org.springframework.web.reactive.function.BodyInserters;
11+
import org.springframework.web.reactive.function.client.ExchangeStrategies;
1112
import org.springframework.web.reactive.function.client.WebClient;
1213
import reactor.core.publisher.Mono;
1314
import reactor.netty.http.client.HttpClient;
@@ -28,6 +29,8 @@ public class RTSCaller {
2829
@Value("${appsmith.rts.port:}")
2930
private String rtsPort;
3031

32+
private static final int MAX_IN_MEMORY_SIZE_IN_BYTES = 16 * 1024 * 1024;
33+
3134
@PostConstruct
3235
private void makeWebClient() {
3336
if (isEmpty(rtsPort)) {
@@ -45,6 +48,9 @@ private void makeWebClient() {
4548
// We do NOT use `WebClientUtils` here, intentionally, since we don't allow connections to 127.0.0.1,
4649
// which is exactly the _only_ host we want to hit from here.
4750
webClient = WebClient.builder()
51+
.exchangeStrategies(ExchangeStrategies.builder()
52+
.codecs(configurer -> configurer.defaultCodecs().maxInMemorySize(MAX_IN_MEMORY_SIZE_IN_BYTES))
53+
.build())
4854
.clientConnector(new ReactorClientHttpConnector(HttpClient.create(connectionProvider)))
4955
.baseUrl("http://127.0.0.1:" + rtsPort)
5056
.build();

0 commit comments

Comments
 (0)