Without seeing the source code, I couldn't say why this is happening. Do you know where it times out, specifically the stack trace?
I'm guessing it's something to do with your code. Perhaps there is a one-time initialization that happens, so it times out at the first time you obtain measurements, but subsequently works.
I too have same Warning which Arun Raj has mentioned, Please can you specify in which area i need to work around to resolve the problem like agent configuration file or server configuration,. It will helpful to us to track the Issue.
Jayakumar Jai J Elumalai.