We are developing a Spring MVC application which does LDAP authentication using Spring Security framework. The problem we are facing is that the authentication works just fine on our development server, i.e. localhost, but when we deploy it on the production server it takes usually 10 to 15 minutes, sometimes even an hour. Than on some occassions it may authenticate instantly. It is totally random. We don't think it is a traffic issue because even on off days, when nobody is using our application, the problem persists. Please advise.
Development Server is Tomcat 7.
For production server we have tried both Weblogic 12c and Tomcat 8.