Apologies if this has already been asked and solved but through numerous searches and lost hair we're getting to the end of our tether!
We have a web server running web services through IIS 6. These web services talk to our database server which has both Sybase SQL Anywhere 9 databases and MS SQL databases. Since a release at the start of December we have been experiencing IIS hanging and can only be made responsive again by re-cycling the default App Pool. Through many investigations, memory dumps and code changes everything seems to be pointing to the Sybase database that is being the culprit. This is backed up by the fact that it is now being accessed a lot more since this release.
We have tried pretty much everything possible but every memory dump we have done when the web server hangs contains the information that "Detected possible blocking or leaked critical section" and that it relates to "dbdata9" which is the main dll used for the Sybase database.
We found that we had not got the latest Sybase .Net Provider and have updated these on the server and in the code but we are still getting these occasional hangs! The latest message that has been reported in the memory dumps a few times is:
"Detected possible blocking or leaked critical section at dbdata9!AsaTransaction_SendTransactionCookie+46640 owned by thread #"
I'm running out of ideas how to get around this and if anyone has any good suggestions on how to progress with this it'd be a great help!
If you need any more information just ask and I will provide.
Thanks in advance.
For anyone who wants to know it seems that the problem was with Sybase itself and was fixed in a later version of its software. Once we updated the dlls to the latest version it seems to have cleared our issues. If anyone wants any more information on this please feel free to ask.
Related
I'm after some general advice here. We have an ASP.net 4 web forms application on Windows Server 2008 R2 and IIS 7.5, with SQL Server 2008. We're experiencing problems with the website timing out, seemingly at random. We've had reports of what people were doing on the site when they noticed it started timing out, and there is no consistency between these. We have also tried all of the things that users reported they were doing, and have had no joy bringing the site down. We have static html pages on the site (albeit with .net4 friendly URLs) and these pages display when the site is timing out.
At first we thought it was a cyber attack, so spend time making sure all ports were closed, remote access only available to select IPs, and routing mail through an external spam filter (allowing us to close port 25). We also ran virus and malware scans which found nothing.
We have made updates to the website at the time that these problems started appearing, however it's really too late and too much has happened on the site that we could roll back the changes without experiencing a bigger headache than we currently are.
I'm a developer rather than a support/hosting/hardware specialist, so don't know huge amounts about server setups, but I've spent a long time going through error logs looking for some positive sign. When I've looked at the error logs around the time the site went down, there has rarely been a error - sometimes there is a warning, but nothing that looks conclusive (this could be where my server inexperience could be a problem however). I'm not ruling out there being multiple issues by the way.
I set up IIS debugging tool as I noticed a w3wp.exe error yesterday (similar to this: an unhandled win32 exception occurred in w3wp.exe), but the site has continued to go down today with nothing new in the debugger. I've debugged the site locally through VS2010 and can't recreate any issue.
So really, I'm on the point where I've run out of ideas, and almost run out of hair to pull out. Can anyone who's a bit more clued up in this area, offer me some advice or a list of things to try in order to pinpoint exactly what is happening here and what is causing it to hang? Any help gratefully appreciated
We found that there were some TableAdapters in the site that were static and shared for the class. After removing them, the problem stopped. Thanks for the help anyway folks
I have a large-ish Winforms application written in C# which is periodically unresponsive. The issue seems to occur once the application has been use for an hour or so. Exact timings are difficult to gather as users often go off to work on something selse, get back to it and find it has become unresponsive.
I think a memory leak can be ruled out as I'm not seeing excessive memory usage (I've asked users to send a screenshot of the task manager and memory usagage is the same as I would see when the application is runnning normally)
Similarly, CPU usage is normal (single digit %)
As I've so far been unable to recreate the issue on mydevelopment PC I am planning on sitting next to one of the affected users and mirror every action the user performs in order to recreate this. (I'll be setting up a laptop to RDP in to my main PC)
Recreating the issue is one thing, but I'll need to find out what is actually going on in the application.
Could anyone tell me if running in debug mode (through visual studio) will be sufficient or will I need to do something different?
I've searched through a few posts and I've seen mention of profiling software, however I'm not sure if this would only help with general performance issues or memory management issues.
Alternatively, if anyone has come across similar freezing issues then do you have any suggestions of the kind of causes for this?
Some technical details: Aplication is C#, compiled against .NET 3.5, winforms GUI. There are a few external libraries (most significant is ComponentFactory Krypton Suite). Data access is to a Microsoft SQL Server 2005 database. The solution contains 39 projects, I'm not sure if that might have something to do with it?
Any suggestions/pointers would be greatly appreciated.
The application is working much more reliably now, freezing issues still occur on occasion but nowhere near as often as before.
The issue appears to be related to the endpoint security (in this case, Cisco Security Agent) present in the environment I'm working in, application has been whitelisted and has has significantly rediced the instances of application hangs. The development system I work on does not have this endpoint security present, so it didn't show up in early stages of testing.
Thanks for all your feedback, I think there are still threading and garbage collection issues that need cleaning up, hopefully this should sort out the last few issues.
I am experiencing the exact same issue as a user reports on eggheadcafe, but don't know what steps to take after reading the following answer.:
Two problems you should chase down:
1. Why is the website leaking resources to the finalizers. That is
bad
2. What is Oracle code waiting on -- work with Oracle's support on it
This is the issue:
I have an intermittent problem with a
web site hosted on IIS6 (w2k3 sp2).
I appears to occur randomly to users
when they click on a hyperlink within
a page. The request is sent to the
web server but a response is never
returned. If the user tries to
navigate to another hyperlink they are
not able to (i.e. the web site appears
to hang for that user). Other users
of the website at the time are not
affected by this hang and if the user
with the problem opens a new http
session (closing IE and opening the
web site again) they no longer
experience the hang.
I've placed a debugger (IISState) on
the w3wp process with the following
output. Entries with "Thread is
waiting for a lock to be released.
Looking for lock owner." look like
they might be causing the issue. Can
anyone tell what lock the process is
waiting on?
Thanks
http://www.eggheadcafe.com/software/aspnet/33799697/session-hangs.aspx
In my case my .Net C# MVC application runs against a MySQL database for data and a MS SQL database for .Net membership.
I hope someone with more knowledge of IIS can help resolve this problem.
It sounds like you have a race condition in your database calls resulting in a deadlock at the database level. You may want to look at the settings you have in your application pool for database connections. Likely you will need to put some checks in somewhere or redefine procedures in order to reduce the likelihood of the race:
http://msdn.microsoft.com/en-us/library/ms178104.aspx
I would explain the experienced hang due to session serialization. Not the part about saving/loading it from some source, but that ASP.NET does not allow the same session to execute two parallel pages simultaneously, unless they execute with a readonly-session. The later is done either in the page directive, or in web.config, by setting EnableSessionState="ReadOnly".
Your problem still exists, this wont change that the first thread hangs. I would verify that your database connections are disposed correctly. However, you never mention any Oracle database in your question (only Mysql and SQL Server). Why are you using the Oracle drivers at all? (This seems like a valid place to start debugging.)
However, as stated by David Wang in his answer in your linked question, part two of your problem is a lock that's never released. You'll need support from Oracle (or their source code) to debug this further.
IIS hang is not something surprising. IISState is out of date, and you may use Debug Diag,
http://support.microsoft.com/kb/919791 (if CPU usage is high)
http://support.microsoft.com/kb/919792 (otherwise)
The hang dumps should tell you what is the root cause.
Microsoft support can help analyze the dumps, if you are not familiar with the tricks. http://support.microsoft.com
I'm looking for a solution to a performance problem. We are using the following:
ASP.net
SQL Server
Entity framework
I am hoping that someone has run into this issue before and has solved it!
It's taking 2 at 3 times longer to execute an HTTP request on a hosted application compared to running the same application locally on debug. However, if we trace between preinit and rederer, on the server host,we are getting something like 0.250 seconds request time but, when are watching it, it is actually taking 3 or 4 seconds to render that complete page.
This is driving us crazy! Any ideas as to what is causing this and how to fix it?
Is there a program can we use to check and debug this for it's root cause? If it was happening to you, are there recommendations as to what you would you try?
Thanks you!
probably any of this:
is the data from the development computer the same that in the production(hosted) server? if not the problem is that you are not using well your ORM or have to optimize your app.
you can use firebug net panel to check if the problem is from the network...
if you are using a VPS and a cheap one, your computer might be better than the server and as the server is shared among several virtual sites their load might affect the performance of your app.
hope it helps.
We have a 2 x Quad Core Xeon server with 8GB of RAM and Windows Server 2003 Enterprise installed on it. We installed our application server which is based on .NET Framework 3.5 on it. The server uses SQL Server 2005 as its database server.
When we installed the application server, it used to have ultra fast performance and everything was fine. Once we joined it into our domain, its performance decreased dramatically. For example a task that took 1 sec to complete, now takes about 30 sec. This is very strange since only .NET based applications' performance got this performance hit but the other applications still run at their normal speed.
Does anyone have any idea about why is this happening? Any help or suggestion is much appreciated.
Unfortunately, more is probably needed to answer your question. There are a host of possible reasons why this is occurring, and most of them involve your code.
Based on the symptom that you joined the domain and then things started causing trouble, I'd say you've got a lot of networking that you're doing that previously was able to be done locally on your machine and the latency is now actually causing trouble.
But that's a wild guess based on not nearly enough information.
I'd suggest you profile your code. Find out where the majority of your time is spent during execution and then post the code or a sanitized version of it here so we can help you optimize it.
I did find the answer to my question so i thought it might be good to share it here. The CLR want generate publisher evidence for assemblies with authenticode signature when it tries to load the assemblies. In our case CLR was trying to connect to clr.microsoft.com but our server's internet access was blocked so it caused huge delay whenever the application server tries to load a new assembly.
The following post describes how you can disable this feature:
Bypassing the Authenticode Signature Check on Startup
I'm going to make a guess here and think that you're talking about a web application. If this is correct, you might want to take a look at the application pools you have setup on the webserver. Your application might be getting confused about which pool to set itself in when it starts running.
Another thing to check might be your data connections and make sure that you're closing everything that's been opened.
The last thing, like Randolpho said, you're just really going to have to follow your code execution with some kind of profiler and see where things are getting tied up.
Good luck!