Function Timing Out

Category: azure functions


tausiffarooqi on Thu, 02 Aug 2018 01:11:46


I am new to Azure functions. I wrote a simple function in Java that does this -

		JsonObject response = new JsonObject();
		response.addProperty("", System.getProperty(""));
		response.addProperty("os.arch", System.getProperty("os.arch"));
		response.addProperty("os.version", System.getProperty("os.version"));
		String res = response.toString();
		HttpResponseMessage<String> httpResponse = request.createResponse(200, res);
		return httpResponse;

And it is timing out. Can someone please advise on what I should look at to try and diagnose why this is timing out?



Pragna Gopa MSFT on Thu, 02 Aug 2018 17:35:50

Can you please share you app name either here or Sharing-Your-Function-App-name-privately

tausiffarooqi on Thu, 02 Aug 2018 18:12:33

Hi Pragna,

Thank you for the response. The app name is


tausiffarooqi on Thu, 02 Aug 2018 19:08:42

The funny thing is that I see in the application log that the function executed correctly, but the response I get from the REST API call is "500 - The request timed out.".

This is what I see in the log -

2018-08-02T17:57:12.714 [Information] 2018-08-02 17:57:12 [ForkJoinPool-1-worker-1] INFO  c.l.f.preprocessing.OSInfoFunction - Finding OS information.
2018-08-02T17:57:13.129 [Information] 2018-08-02 17:57:13 [ForkJoinPool-1-worker-1] INFO  c.l.f.preprocessing.OSInfoFunction - Response generated: {"":"Windows Server 2016","os.arch":"amd64","os.version":"10.0"}

tausiffarooqi on Fri, 03 Aug 2018 16:53:18

Hi, if anyone can provide some clue as to what might be happening I will greatly appreciate it. Thanks!

VladimirZD on Mon, 06 Aug 2018 10:54:18

Did you try caling same request from postman or something.

It seems like destination server times out?

SubChord on Mon, 06 Aug 2018 13:18:47

Same problem here. Functions were working perfectly last week. Stopped working today. Only getting timeouts.

tausiffarooqi on Mon, 06 Aug 2018 16:21:11

I'm pretty sure it is hitting the function because I can see it in the application insights graph, and sometimes it prints the application logs (as can be seen in my comment dated Thursday, August 2, 2018 7:08 PM). But for some unknown reason the API call returns a timeout. Yes, I'm trying these api invocations through Postman.

Micah McKittrick on Tue, 07 Aug 2018 19:06:49

Are you following any documentation that you could share here? 

tausiffarooqi on Thu, 09 Aug 2018 03:57:28

Yes, I followed this documentation -

Micah McKittrick on Thu, 09 Aug 2018 22:59:13

Thanks for this! Would you be able to try running your function on premise to see if you get the same issue as you are when running in Azure?

Pragna Gopa MSFT on Fri, 10 Aug 2018 20:20:32

Apologies for the late response. You are running the latest runtime version 2.0.11946 which had breaking changes for HttpTriggers. Please see here for more details app-service-announcements/issues/122

tausiffarooqi on Sat, 11 Aug 2018 19:08:43

Hi Micah,

When I run on premise it runs without any issue. I will check what Pragna has proposed and see if it fixes the error. In the meantime I have ported my code to an Aure web app and have made it run as a Tomcat app.