https://linen.dev logo
#general
Title
# general
j

jan zamoyski

02/10/2023, 8:53 AM
Hi, I use proxyBaseUrl and most of the time I get the correct response. Usually, after some inactivity time, I get above error. Another requests, again gets correct response
t

Tom

02/10/2023, 8:54 AM
Hi @jan zamoyski are you using the latest stable WireMock version?
j

jan zamoyski

02/10/2023, 8:55 AM
I tested it on 2.27.2 and the latest 3.0.0-beta-2 and on both versions I have this error
t

Tom

02/10/2023, 9:02 AM
2.27.2 still had connection reuse enabled on the HTTP client used for forward proxying, which meant resets might happen if the connection hit the idle timeout on the target server. However, since you’ve also tried 3.x which has reuse disabled for the forward proxy client, this is puzzling. It should create a fresh connection for each request and thus avoid inactivity behaviour like this. Have you made any tweaks to WireMock’s configuration that might have overridden this?
j

jan zamoyski

02/10/2023, 9:12 AM
This is my configuration:
Copy code
wmConf = WireMockConfiguration.wireMockConfig()
      .withRootDirectory(wmSrvStubsRoot)
      .port(wmSrvPort)
      .disableRequestJournal()
      .containerThreads(500)
      .jettyAcceptQueueSize(350)
      .jettyAcceptors(350)
      .jettyHeaderBufferSize(16834)
      .asynchronousResponseEnabled(true)
      .asynchronousResponseThreads(10)
t

Tom

02/10/2023, 9:14 AM
Nothing there that would affect the HTTP client. Do you have any `http.*`system properties set? These affect the client if they’re present.
BTW 350 acceptors is way too high - 2 per CPU core is a good rule of thumb.
j

jan zamoyski

02/10/2023, 9:19 AM
Copy code
Do you have any http.*system properties set? These affect the client if they're present.
will need to check nginx
t

Tom

02/10/2023, 9:20 AM
Sorry, I mean Java system properties set when starting your code
j

jan zamoyski

02/10/2023, 9:21 AM
I will need to verify it, right now I'm not 100% sure
Thanks Tom for your help 🙂
👍 1
t

Tom

02/10/2023, 9:22 AM
Other thing to look at would be taking a tcpdump when testing and look to see if it is indeed keeping a connection between WireMock and the target for a long period. Although the behaviour you describe sounds like that’s happening I can’t be 100% sure. There are other reasons the server might send a reset packet.
👍 1
2 Views