1

I'm trying to troubleshoot why the first call on a web service is taking more than a minute when subsequent takes less than a second (this repeats every 10+ minutes without calls). I ran Wireshark on the server and the difference that I found was that the slow request calls to LDAP and the other doesn't. On the slow request, I can see the client/server Hello and Handshake and an LDAP call. Then the server waits (or addresses other requests) until EXACTLY 60 seconds later (see below picture), another call to LDAP is made, immediately after which the first line of the code begins to execute.

The fact that it takes exactly 60 seconds EVERY TIME makes me think that there is a timeout involved somewhere, but I'm struggling with the configurations.

Other non-web-service requests start directly with the second LDAP call, but this REST request is being punished for some reason.

Any idea on how can I improve this? Anything will be a lot of help. Thanks

See the execution time

1 Answer 1

1

Found the cause: Looks like windows closes LDAP connection after 15 minutes, but the default Apache behavior appears to try to re-use the connection indefinitely. If Apache tries to re-use it after windows have closed the connection, there's a 60-second delay waiting for the connection to timeout, which matched my issue.

Many forums report that lowering LDAPConnectionPoolTTL to a value lower than MaxConnIdleTime at the Apache configuration solved their issues, but the only thing that worked for me was setting it to 0, disabling at all the reuse of existing connections.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.