Hi, I use proxyBaseUrl and most of the time I get ...
# general
j
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
Hi @jan zamoyski are you using the latest stable WireMock version?
j
I tested it on 2.27.2 and the latest 3.0.0-beta-2 and on both versions I have this error
t
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
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
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
Copy code
Do you have any http.*system properties set? These affect the client if they're present.
will need to check nginx
t
Sorry, I mean Java system properties set when starting your code
j
I will need to verify it, right now I'm not 100% sure
Thanks Tom for your help 🙂
👍 1
t
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