0
Respost

Application Error occurs sometimes

Josef Biehler fa 12 anys updated by Matthew O'Riordan (Founder) fa 12 anys 4
Hello,

i am using your API to get the Statistic Objects for a Backlog.
(To parse the APIs' output i am using RESTSharp library).

Sometimes the API returns following HTML Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <style type="text/css"> html, body, iframe { margin: 0; padding: 0; height: 100%; } iframe { display: block; width: 100%; border: none; } </style> <title>Application Error</title></head> </head> <body> <iframe src="//s3.amazonaws.com/heroku_pages/error.html"> <p>Application Error</p> </iframe> </body> </html>

Most of the time it works fine.
In fact i'm fetching about 7 Backlogs and while one (i think it is always the same) fails, the other ones are imported correctly.

The ID of the Backlog is 4702.

I would be very grateful if you take a look into.


Answer

Answer
Respost

Hi Josef


This issue has now been resolved.  In our tests, the stats query you were making before was taking around 28 seconds, it now takes 4 seconds.  There are possibly some further optimisations we can do, however considering the impact of this change, I believe it's unlikely this will be an issue for you in the future.


Please shout if you see any further problems.


Matt

Under review

Hi Josef


I'm sorry to hear you're having issues.  Oddly that error indicates that the problem is in fact at the router level, and not at our application level i.e. if we presented an error it would be in a suitable JSON format, and our error logging system would have notified us, which unfortunately it didn't.


I can certainly investigate, but could you answer a few questions:

  • You mention you're using the API to retrieve a few backlogs, do you do this synchronously or asynchronously.  I'm just trying to get a handle on how many concurrent requests we may be dealing with as the stats requests are actually a little server intensive.
  • Can you send me a sample `curl` command so that I can see how you are accessing the stats.  Obviously please exclude your API key ID.
Thanks, we'll get to the bottom of this as soon as possible.
Matt

Thanks for your fast reply!

Currently i am using synchron requests.

I will change this to asynchron requests today and monitor the API calls' output.


@CURL command

curl -k --user USER_ID:USER_API_KEY https://easybacklog.com/api/accounts/250/backlogs/4702/stats

The time the error occured was: 2013-05-09 23:42:54 [UTC+1]
But i know that i got that kind of error earlier, too.

Perhaps i can solve it by using asynchronous requests. Thanks for this hint!


Well actually I suspect asynchronous requests might make it work as you will be hitting our application servers harder concurrently.


We are not around today unfortunately, so will look into this on Monday.


Thanks,
Matt

I have implemented the requests as asynchronous requests and will have a look onto the logfile the next days.

:)

Hi Josef


I have found the error in our log files, and it's a performance related issue.  The router is timing out and the process is being killed because it's taking too long to perform this operation.  We will replicate this issue internally and find a solution.  Thanks for notifying us of the problem, and sorry for the inconvenience.


Matt

Answer
Respost

Hi Josef


This issue has now been resolved.  In our tests, the stats query you were making before was taking around 28 seconds, it now takes 4 seconds.  There are possibly some further optimisations we can do, however considering the impact of this change, I believe it's unlikely this will be an issue for you in the future.


Please shout if you see any further problems.


Matt