Web service timeout error - sql

We are running SQL Server 8. Every day when our users try to run a report for the first time it takes too long and eventually displays the error message below (other subsequent runs for the report work fine). Here is the error message.
Server Error in '/' Application.
The operation has timed out
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The operation has timed out
Can anyone help with this issue?
Thanks.

If it is only slow on the first run, you can fix it by running a "warm-up" script. This can be as simple as setting a timer to call a web address (a report in your SSRS). The Windows Task Scheduler is pretty easy for this purpose. I've seen people do it for web servers, DBs, reports, nearly anything that is slow on the first run (due to caching or just-in-time compliling).

Related

Intermittent problems starting Azure App Services: "500.37 ANCM Failed to Start Within Startup Time Limit"

Our app services are experiencing the problem, that they can’t be restarted by the hosting environment (ANCM).
The user is getting the following screen in that case:
Http Error 500.37
Our production subscription consists of up to 8 different app services and the problem can randomly harm one of them ore some of them.
The problem can occur several times a week, or just once a month.
The bootstrapping procedure of our app services is not time consuming.
The last occurrence of the problem has this log entries within the eventlog:
Failed to gracefully shutdown application 'MACHINE/WEBROOT/APPHOST/XXXXXXXXX'.
followed by:
Application '/LM/W3SVC/815681839/ROOT' with physical root 'D:\home\site\wwwroot' failed to load coreclr. Exception message: Managed server didn't initialize after 120000 ms
In most cases the problem can be resolved by manually stopping and starting the app service. In some cases we had to do that twice.
We are not able to reproduce that behavior locally.
The App Service Plan is S2 and we actually use just one instance.
The documentation of the Http error 500.37 recommends:
"You may need to stagger the startup process of multiple apps."
But there is no hint of how to do that.
How can we ensure that our app services are restarted without errors.
HTTP Error 500.37 - ANCM Failed to Start Within Startup Time Limit
You can try following approaches:
Approach 1: If possible, can try to move one app into a new App Service with a separate App Service plan, then check whether it can start as expected.
Please note that creating and using a separate App Service plan would be charged.
Approach 2: Increasing the startupTimeLimit attribute of the aspNetCore element.
For more information about the startupTimeLimit attribute, please check: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-3.1#attributes-of-the-aspnetcore-element

What is the difference between System.Data.SqlClient.SqlException: Execution Timeout Expired. and System.Data.SqlClient.SqlException: Timeout expired

I have a number of SQL timeouts I am logging. Recently, the stack trace errors that contained System.Data.SqlClient.SqlException: Timeout expired. stopped occurring. However, I still get plenty of the ones that look like System.Data.SqlClient.SqlException: Execution Timeout Expired.
I was getting both prior to whatever changed. I can't find anything detailing why the .NET framework spits out one or the other. I know both are caused by the SQL being executed doesn't finish before the command timeout. Just looking for what is the difference.
It is about the .Net Framework installed.
For us with the installation of 4.7.2 we started getting 'System.Data.SqlClient.SqlException: Execution Timeout Expired.'
instead of the previous one: 'System.Data.SqlClient.SqlException: Timeout expired.'

Weblogic 12.1.3 console gives 503 error

I am getting this error whenever I am trying to open console for weblogic. It was working fine a few days ago.
<A problem occurred while dispatching the servlet request.
weblogic.management.DeploymentException: <openjpa-1.1.1-SNAPSHOT-r422266:1445923 nonfatal user error> kodo.jdo.UserException: This operation cannot be performed while a Transaction is active.
at weblogic.application.services.BackgroundDeploymentService$OnDemandDeployer.deploy(BackgroundDeploymentService.java:173)
at weblogic.servlet.internal.OnWebUriDemandDeploymentProvider$OnWebUriDemandListener.OnDemandURIAccessed(OnWebUriDemandDeploymentProvider.java:46)
at weblogic.servlet.internal.OnDemandManager.loadOnDemandURI(OnDemandManager.java:113)
at weblogic.servlet.internal.MuxableSocketHTTP.handleOnDemandContext(MuxableSocketHTTP.java:210)
at weblogic.servlet.internal.HttpConnectionHandler.dispatch(HttpConnectionHandler.java:647)
Truncated. see log file for complete stacktrace
Caused By: <openjpa-1.1.1-SNAPSHOT-r422266:1445923 nonfatal user error> kodo.jdo.UserException: This operation cannot be performed while a Transaction is active.
at org.apache.openjpa.kernel.BrokerImpl.close(BrokerImpl.java:4087)
at org.apache.openjpa.kernel.DelegatingBroker.close(DelegatingBroker.java:1298)
at kodo.jdo.PersistenceManagerImpl.close(PersistenceManagerImpl.java:958)
at com.bea.security.providers.xacml.store.BasePolicyStore.setPolicy(BasePolicyStore.java:757)
at com.bea.security.providers.xacml.store.BasePolicyStore.setPolicy(BasePolicyStore.java:615)
Truncated. see log file for complete stacktrace
Error in IE on opening console
All the other applications deployed on it are working fine.
One of my clients is having the same problem but on WLS12.2.1.4.
So far, I have found 2 hints that could help you:
the embeddedLDAP is corrupted as described by kodo.jdo.UserException: Exception on Running OIM Patch_weblogic script (Doc ID 1108693.1). Solved after regenerating the embeddedLDAP for this particular managed server.
the server is affected by bug 20717082. The patch 20717082 is available for WLS10.3.6, WLS12.1.2, and WLS12.1.3.
Hope some of these options work for you. On my end, I'll keep on investigating.

Troubleshooting Web App process restarting

Our web app process is restarting regularly and we are unable to determine the reason.
When looking into Application Events (using the 'Diagnostics and solve problems' blade in the Azure Portal), there exists a bunch of the following Info logs by 'IIS AspNetCore Module'
Event ID 1005:
Failed to gracefully shutdown process '14040'.
Event ID 1001:
Application 'MACHINE/WEBROOT/APPHOST/myapplication__xxxx' started process '31628' successfully and is listening on port '17663'.
There is nothing fishy with general resource usage and nothing in our application logs.
What is the best way to troubleshoot the reason behind these process restarts?
EDIT 1:
After fiddling around with web logging in the Web App's Diagnostic Logs, I now get an error logged from W3SVC-WP after each restart, but the message is nonsense:
1<br/>5<br/>50000780
EDIT 2:
Event Id 2284 refers to this:
FailedRequestTracing module failed to write buffered events to log
file for the request that matched failure definition. No logs will be
generated until this condition is corrected. The problem happened at
least %1 times in the last %2 minutes. The data is the error.
I'm not sure if this could be related to our Diagnostic Logs configuration, but seems unlikely.
EDIT 3:
As per Brando Zhang's suggestion, I've used the Web App Crash Diagnoser extension and tried monitoring 2nd Chance Unhandled Exceptions on both my application process AND on w3wp, but nothing is dumped.
From how I understand it, 1st Chance Exceptions will not crash the process, so no need to monitor these.
Very likely application is crashing due to fatal exception and causing the restarts.
On Azure App Service platform.You can use the Diagnostics as a
Service (DaaS) to troubleshoot this
It can also do an analysis and tell you the root cause most of the time.More step by step infofrmation can be found on this msdn blog .Also refer tips for using crash diagnoser

Error when deploying Silverlight5 app: Load operation failed for query

I am having trouble deploying a Silverlight5 application. I'm releasing to a Windows server 2003 R2 running IIS6. This is the error that I get:
Load Error -
System.ServiceModel.DomainServices.Client.DomainOperationException:
Load operation failed for query 'GetvSiteSetupStatus'.
[HttpWebRequest_WebException_RemoteServer]
Arguments: NotFound
Debugging resource strings are unavailable. Often the key and arguments provide
sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.1.10411.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer
---> System.ServiceModel.CommunicationException: [HttpWebRequest_WebException_RemoteServer]
From what I can see the control loads, but no data is shown. Running Profiler on the server shows that the queries are not run on the database at all. I suspect it to be a WCF issue, but don't know where to start looking. The error is not very clear.
Any help will be appreciated.
Thanks
I figured out my error. I was testing my page with .html instead of .aspx.