question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Log APIs taking way to long to return data

See original GitHub issue

In the functions portal Monitor tab, pulling log data for a simple function that has had less than 10 execution is taking around 8 to 10 seconds to load.

I’ve verified that the issue isn’t the portal itself, but the actual log API itself on the SCM endpoint, e.g.:

https://<mysite>.scm.azurewebsites.net/azurejobs/api/functions/definitions?host=<mysite>&limit=11

This query is taking 8 to 10 seconds. Since this is only issuing a few table queries, it should be able to return in under a second. We need to find out where we’re spending the time.

I even went in and deleted my old v1 log table, as well as the one previous month table, so I now only have a single log table AzureWebJobsHostLogs201611, in addition to AzureWebJobsHostLogscommon.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
MikeStallcommented, Dec 1, 2016

The slowdown is here: https://github.com/Azure/azure-webjobs-sdk/blob/dev/src/Dashboard/ApiControllers/FunctionsController.cs#L523 After getting the function definitions, we do a fan out to get stats on each definition. So it slows down with the number of definitions.

0reactions
MikeStallcommented, Dec 13, 2016
  1. We’ll add a new flag to /definitions to suppress the fan out.
  2. Portal can pass the flag and use the existing “api/functions/invocations/{functionId}/timeline” to get those stats.

Portal changes are tracked via: https://github.com/projectkudu/AzureFunctionsPortal/issues/844

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to log time taken by Rest web service in Spring Boot?
Have you tried with a basic filter like this? import java.io.IOException; import javax.servlet.*; import javax.servlet.annotation.
Read more >
Is it worth logging HTTP requests when they enter an API ...
Logging request, response, and user info is perfectly valid if your goal is to build a profile of your users. Google certainly does....
Read more >
Common API mistakes and how to avoid them
Create a secret endpoint in your application which throws an error. Try to upload a file which is too large, send a payload...
Read more >
Debugging best practices for REST API consumers
However, the volume of logs has diminishing returns as it takes more time to interpret the logged data. Backtracking strategy. This strategy ...
Read more >
5 Tips to Optimize Your API's Performance
The easiest way to cache responses is to periodically expire it, or force it to expire when certain data updates happen.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found