Web API: 500 error after short timeout - asp.net-web-api

I've got my Web API interface working fine but after a fairly short period, like around 5 minutes, it gives a 500 Internal Server Error on the first call and then works fine again until it times out. I'm not getting any additional information on the error message and there's nothing going to the logs. I don't have the issue on my development machine, just on the live server. Any ideas what might be causing this? How can I get additional error information on a live server?

The simple answer to this was set Custom Errors Off within the Web.config file. That gave a very useful error that made it easy to track down the problem.

Related

Ajax error 401 in production, but works local

I have a Net Core application that started to present a few problems lately. It was working just fine, but recently my Ajax calls will throw a 401 error.
That just happens in the production server, running on localhost everything works just fine. Also, this appears to be happening randomly, so the same ajax call will sometimes throw this error and sometimes it won't.
After digging a lot I noticed a few differences between the headers of those calls when they run local and when they run on the production server, but I don't know exaclty how to interpret and solve them.
Could you help me? None of those calls are to an external API/resource, they all call the page the user is currently on in the app itself.
I'll add the screenshot of the console showing the difference between headers. On the left is the one running local and I've used exactly the same data on both tests.
The production server is running IIS 10, if that's relevant.

Requests getting failed with error 400 when thread count increased in jmeter

.net application starts giving error http 400(bad request) when 200 concurrent users are loaded.
And while running script, when application is browsed manually, could able to see same errors. This basically rules out, its not client issue.
So What is causing this error?
Kindly help
We don't know but it sounds like an application bug in any case because HTTP status codes 4xx are client errors and given it occurs only under the load the application should respond with 5xx server error codes
You need to inspect your application/webserver/loadbalancer logs as most probably the cause can be figured out from them.
Also it would be a good idea to check whether your application has enough headroom to operate in terms of CPU, RAM, etc as the errors could be caused by simple lack of resources. You can use i.e. JMeter PerfMon Plugin for this

licenseNotification API has stopped working

Calling https://www.googleapis.com/appsmarket/v2/licenseNotification/[myAppId] has suddenly started returning 500 Backend Error every time.
500 error is a generic message, given when no more specific message is suitable. There are a number of causes for a 500 Internal Server Error to display in a web browser.
With any error message, particularly one as broad as the 500 Internal Server Error, you will first want to check your error logs for your server. These logs can provide valuable context related to any code failures or other potential causes of a site failure.
As stated in the answer in this SO question.
In general, every Backend error should be handled with an exponential retry, as
there might be service problems.
If the error still persists after let's say 10 hours then you should
contact the support in order to provide you 1:1 help to your problem.

Playframework-2.0 NettyDispatcher 500 Error on Heroku

I started getting 500 Internal Server Error(ISE) on Heroku, tried enabling debug level logs. The error is not consistent, it occurs for some request, for others it goes thru properly. When there is an ISE there is not even a single log line(even with debug on) in web dynos... I am able to see that the 500 response is given for the request.
From the client side am seeing the following
This exception has been logged with id 6gimbegj7
The above line tells that it should a response from Play! when it is running in production mode.
Attached New Relic monitoring plugin where it says the Exception occurred on NettyDispatcher (Netty IO server), not further info.
Any idea what could be the issue?
We have identified the problem here,
In play! we have a Global.java on the root of the packages, which has the methods like
onRequest(), onRequestRoute()
If there is any error at this place, and if we do not handle the exceptions, then Netty directly throws an 500 response to the request. This can happen from any part of the application. We did catch the exceptions in other part of the application but missed this one.
Mimicking the heoku env with the help of Foreman tool helped us to narrow down on the cause. As such setting the playframework log level to DEBUG did not throw any logs/stacktrace, Not sure why.

Magento newsletter subscribe gives 500 internal server error

Interesting bug. When I try to subscribe to magento newsletter, I end you getting an internal server error 500. However on refresh via the url, it gives me the thank you for subscribing and adds to the database too!
Can anyone shed some light into this or faced similar problems?
Julian
PS: Thank you in advance
Please see your web servers log for errors. Usually the servers logs the occured php error which results in the 500 internal server error.
Many things could force this error. For example max_execution_time or memory overflow.

Resources