IIS occasionally no response - sql-server-2008

I'm facing a problem with a 3-tier application. It uses IIS and SQL Server. And the problem is that sometimes (longer requests cause higher probability) client does not receive response from IIS. It hangs when there is no activity ON SQL Server, and when even when I kill an SQL Process I get no response with an exception. When I examine data after these hangs I find that my SQL requests have succeeded, so the problem appears to be on IIS. Unfotunately I don't have much control over the place where the application is hosted and I cannot reproduce the problem. There can be many answers to this question, but at least I need a hint in what direction I should investigate.
UPDATE: I also have an app running on the same server that does a small job: it inserts around a 100 lines line-by-line into a database. Artificially I made it run for about 10 minutes (by putting xlock on the table). After removing the xlock the process on IIS continued running and successfully inserted those 100 lines. However, control never returned to the client thereafter, it just waited indefinitely. It looks like this is a problem when returning a response to the client after a long running process.
BTW, this is not a website, but a WinForms app that uses Remoting.

If you're sure that SQL Server is returning to IIS, then you might want to check the IIS logs to see what might be happening to the request. The normal location for these logs is %SystemRoot%\system32\Logfiles\<service_name>.
If you're not sure about SQL Server, you might access the SQL logs, run Profiler, or check the Windows system logs for errors, run your site in debug in Visual Studio or add your own logging to your app to figure out which step it's hanging on.

I have finally figured out where the problem is. The application is run on a web farm and there is a balancer server between the client and IIS. There was a too small timeout on the balancer. For some reason it is not quite friendly with .net remoting and it doesn't return any timeout exceptions to the client. The issue has been solved by increasing the timeout.

Related

Deploying a .NET application to Google Cloud Platform worked on initial deploy, now getting 502 Error: Server Error

To give some background, I'm an (unpaid) intern, and I'm unrelated to dealing with this kind of stuff. My employers wanted to update some pictures, and they did locally but didn't know how to upload the new version to the server.
I used the publish settings that were saved in Visual Studio from when the previous intern deployed the server (he was specialized in web site stuff) and it worked on deploy ... then I refreshed the page and I'm getting 502 server error.
Steps I have taken:
Connect to the VM and restart it - didn't solve it. it's using Microsoft server 2016.
Open the VM trough RDP, check if there are errors. There were 3 services not running, and I start them manually. One still isn't running, Downloaded Maps Manager. Ok... I google it and it's not a necessary service so I disable it. Now there are no errors and all services are running but I still am getting this error.
I tried pinging the IP of the server, and the URL itself and it works.
I believe it might be something to do with the load balancer, but I had one HTML class and nothing dealing with actually publishing stuff. If you could point me in the right direction I would appreciate it. The only reason why I'm trying to fix this myself is that I didn't make some kind of backup, and I feel so stupid having taken the site down.
Edit: I've gone to "load balancing" and it says service unhealthy. I tried going to the IPs there and it brings me to the same 502 server error page. From what I've gathered this is a configuration error, it's impossible they messed something with the site itself, right? It did work that first time, and if I run it from Visual Studio it works on the local machine ...

"Arithmetic operation resulted in an overflow." getting this error in ASP.Net after converting to the Azure project

I am working on an asp.net application. Now I am working on to move it to windows azure server. After converting the project to the windows azure project it gets started to give me errors in accessing the database. I am able to access the data but the problem occurs where-ever I am selecting longblob type column and bit columns.
When running the application as normal asp.net application everything works perfectly but when I run it as the azure application from my visual studio, it starts to give "Arithmetic operation resulted in an overflow." when filling the data-table. After doing some research for this I found that this type of error occurs in when there are some special type of columns are selected in the select command. In my case the special data types are "longblob" and bit[1] in the mySQL database table.
Please suggest a solution to make this work in windows azure environment too.
This is a known issue for Hybrid Connection to access SQL server.
Please follow the temporary fix mentioned here https://blogs.msdn.microsoft.com/waws/2016/05/17/hybrid-connection-error-with-sql-server-system-overflowexception-arithmetic-operation-resulted-in-an-overflow/
I am having the same issue today as of last night. The application has not been updated in weeks. Everything I have read indicates it has something to do with using an int32 and the int being too large but the page the application is crashing on is not using an int in the code behind. I disabled all SQL on the page and it still crashes. I think this is something on the Azure side. Putting in a ticket with them. I'll keep you updated.
Here is what fixed it for me.
My Azure Web App was using the Azure Hybrid Connection to access my on-site SQL server. The server running the HCM also runs Azure Backup. One of my admins had updated the Azure Recovery Agent on that server.
After trying all sorts of things, uninstalling the most recent update to the Azure Recovery Services Agent is what resolved the issue. My Web App was able to access my on-site dbs without issue.
I had the same error when using an Azure hybrid connection with an onsite SQL Server. I did not have the Azure backup agent installed on the local server, however I did have Windows Server 2012 set to automatically update and there were a lot of updates which were pushed out on May 10 2016.
At this stage, I'm not sure which update specifically caused the problem, but I have narrowed it down to either 3146978, 3146751, 3146604, 3145384, 3144850, 3142026, 3135998, 3134179, 3125424, 3103616 or 3145432.
If you're running into issues with Azure Hybrid Connections, try uninstalling KB3142036 from the server which runs the Hybrid Connection Manager. Seems to have solved the SQL Server connection issues for me.

Intermittent MySQL Connection Error in Azure Website

I'm getting the following error intermittently when making a call from my ASP.Net MVC web application which is using Dapper to query MySQL.
Unable to connect to any of the specified MySQL hosts.
The exception only occurs when my web app is published to Azure. It has worked 100% of the time when I run the code locally. I've deployed the code to a second azure website, and also get the exception there, again intermittently.
The MySQL database is running on an Azure VM (Ubuntu). This server also has some R scripts that access the database, which are being run at a set interval. I've had no connectivity issue with these either. It is just the .Net code that's struggling.
I've scoured the web, but don't feel like I've turned up anything of value. Most of the links have pointed to a connection string problem, but since it works intermittently that doesn't seem to fit my problem. Some links have referenced DNS issues, but I'm getting the same problem when I use the IP Address instead of the machine name for the DNS server.
I'm sure I need to track down more information, but I'm not sure where it would be. This is my first foray into using a MySQL db in this fashion, and I'm not familiar with config options or log files on that side of things. I feel similarly about Azure websites with database interactions too.
What can I try next?
Just to drive home the point about this error being intermittent, here's a screenshot from the Runscope job that's hitting the page (thus triggering the MySQL query) every 5 minutes:
I was able to fix (or perhaps "circumvent") this problem by adding the --skip-host-cache flag to our mysql configuration file. I still don't fully understand what the root of the problem is, but we haven't had any issues with MySQL connectivity from the Azure website since adding that.

Application Error: Application Launch was not detected for application App

When I was validation my Windows Store App I got the following error:
Application Error: Application Launch was not detected for application
App. This could be because your application failed to launch
correctly. Please consider re-running the test and avoid interacting
with the application while tests are running.
What does this mean? The app will not validate.
I thought it was a bit weird and I couldn't find anything when I googled it but people who had almost the same problem as me, though rather than launching it was failing to sleep. This was just plain odd.
I tried to launch the app from Visual Studio 2012 just to prove to myself that it did start properly and for some crazy reason it didn't work. I usually test the game on my Local Machine rather than the Simulator but now, for some reason, it was set to the Simulator and I have been having problems getting it to start lately (the simulator).
I changed it back to the local machine and ran the tests again. This time it worked.
So, if you get this error it might be time to see if your simulator works and if not, have the Local Machine set as default to run with.

IIS 7.0 ASP.Net 3.5 Application fails when multiple users log on

I have an ASP.Net 3.5 Application hosted on Windows Server 2008 machine using IIS 7. There is a seperate application pool for this application.
The problem I have is that as soon as 2-3 users access website simultaneously, it starts throwing exceptions on almost any task performed say e.g. an exception during logging in the user using built in aspnet_membership. The same things work fine when there is only one user using it.
Any suggestions what things I need to test for?
Thanks,
Ali
I had some problem like this for some web-application, but in my case I was using IIS 6.0. After analyzing the application by means of some DevPartner tools for analyzing memory usage we realize that some components were consuming excessive resources, by replacing the toolkit we were using for simple .Net controls the applications stop crashing. Most of the crashes are due to problems in code. Also check the web config in the following points: sessionState, authentication. Disable custom errors (customErrors) to view the error details. See the application event's log to check the error description.
The first thing I do when setting up a website of this nature is to uncouple the session state from InProc to StateServer. Oftentimes I find that an application recycle or even an application level exception can cause the w3wp.exe process to crash and reload which dumps session errors. As with #Arce Brito's recommendation, you should do everything you can to find the root cause of the exception as decoupling the session will really only mask the symptom.