Running same LINQ query on host machine very slow [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Improve this question
My customer has issue that, he can't use 2 functions on my system because the operation is timeout.
So i ask him for DB backup to restore on my dev machine for test. On dev machine it run very quickly, no timeout.
My system is using EF to connect to DB.
First function run on my dev machine is less than 1 second, but on customer's server is timeout(for this function, timeout is set to 30 seconds).
Second function run on my dev machine is about 60 seconds, but on customer's server is timeout(for this function, timeout is set to 300 seconds).
I have test by using 'SQL Server Profiler' to capture statement that sent to SQL Server, then i send the captured statement by using SqlCommand instead, it's not slow, time usage is nearly to my dev machine.
I don't know why, is there any mistake configuration can make this thing happen.
Any ideas, Thanks

Three things I can think of to try:
If you are restoring to a newer version of SQL then your statistics are being updated when you restore. Have the customer run UPDATE STATISTICS on the tables that are being hit.
Take a look at the server specs, and task manager -> Resource Monitor see if anything jumps out at you.
It may be something environmental on their network. Check the network throughput between the client and server.

Related

Azure VM gets disconnected from network very often [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I have a Windows service running on Azure VM. The service constantly accesses KeyVaults and Web APIs to run some tasks.
The logs in my service show this message sometimes while accessing keyvault. Most of the times service can access keyvault, but sometimes I get this error:
System.Net.WebException: The remote name could not be resolved:
'keyvault.vault.azure.net'.
When I connect to VM through RDP, sometimes I get disconnected with the following message and immediately connects after few seconds.
But when I see System Logs in Control panel, it shows no error message at that time.
I also have another issue while making an HTTP request to Web API as explained in this question.
So my question is, can all these be related to one another? Is it possible that VM is getting disconnected very often from the network and due to this, all the above-mentioned things are happening? How can I test and conclude this?
The times i have seen issue like this it is due to OS performance issue. It could be memory, CPU or even network throttling but almost certain performance issue.
Make sure the VM sku you are on is able to handle application performance.
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/sizes
Hope this helps.

.net application slow down but after restart iis and sql server service it works fine for some hours [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
we are facing application slow down and user unable to use it. for simple transaction it takes 5 to 10 minutes or not responding. but if we restart IIS & Sql Service then it work fine but only for next 4/5 hours. following is the details of application.
Application is 3 tire architecture. WCF web service project is hosted in IIS6 on server having OS Advance Server 2003 and SQL Server 2005 is on the same server and client application is separately install on every client machine (approx. 50 users) by click once deployment.
For data access we have used Microsoft Enterprise Library. application developed on framework 3.0.
any help will be really appreciated. Thanks in advance.
Well there are so many possible reasons of this starting from poor written queries, lacking of useful indexes etc. It's hard to tell anything really useful without any details. However I recommend getting familiar with sys.dm_os_wait_stats dynamic view in SQL Server. It is a very good starting point. Check out this great article: http://www.mssqltips.com/sqlservertip/1949/sql-server-sysdmoswaitstats-dmv-queries/
And be aware that all the information stored in DMVs is lost whenever you restart SQL Server. It's complicates the troubleshooting and considered as a bad practice, try to avoid it.

What are the possible reasons for error "The operation has timed out"? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I wrote a small program for downloading files for my client.
The program uses HttpWebRequest to send a POST request and a GET request.
I tested the program on my laptop and on my manager's desktop and it worked well.
However, when I deployed the program to my client's desktop, it gave me this error:
"System.Net.WebException: The Operation has timed out."
What might be the possible reasons for this?
The deployment was very simple, I just changed the App.config to set the target folder's path.
My client's desktop is a server. Is it possible that firewall blocked my request?
But I was able to accomplish the downloading process through browser on my client's desktop.
Please give me some suggestions if you have related experience.
Thanks
Firewall, Antivirus and insufficient timeout are very possible reasons (in my experience).
Probably the windows firewall is blocking your application from connecting to the server. Try to add an exception for your app by running wf.msc. You will need to add an outbound rule.
In order to test quickly whether this is the real reason for your problem, you can try to disable the firewall completely for a short time if it isn't a big security risk.

Backup using linked server [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
i am working on project in which we need to take backup of our database(schedule backup at Every 5 min SQL SERVER 2012) to remote server(SQL SERVER 2012) . now if server crashed for some reason then our website should automatically be connected with other server. can we use linked server for that of something else we can do
I would suggest to follow the standard solution for simple redundancy scenarios which is database mirroring. Automatic failover works with having a witness machine which handles the database communication and in case a database server fails, the traffic is redirected to its mirror automatically.
However, note that this architecture leaves you with a single point of failure, the witness. If the witness fails, you have to use redundancy strategy for it. The advantage is that this new recovery process, will not include the database recovery process itself.
Hope I helped!

Server RAID 5 failed...all I have left is my compiled website [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Yesterday, 2 of the 3 drives in my dev server's RAID 5 decided to die on me (with no warning). I've come to grips with the fact that my data is most likely lost unless I shell out some major bucks for professional data-resortoration. People, don't be an idiot like me and treat your RAID as a data backup!
Luckily I published the site about 4 hours before my files went bye-bye. Is there any way to run some [magical] program to restore my compiled site to their original files?
Also: I develop on one machine with the files stored on the server...is there some visual studio 2010 web cache on my local machine (the one that didn't crash) that I may be able to use?
you can try http://www.red-gate.com/products/reflector/ on the compiled site. May work.
If you have lost 2 of 3 drives you cannot get your data back.
You can use reflector on your compiled files to get your source code back. The standard version or reflector is free.
Log in to your FTP server and see what's there. Maybe the files were copied there.
I restored my RAID 100%.
The RAID configuration and some of Windows' files became corrupted. All I had to do was reconfigure the RAID and replace the boot files for Windows.

Categories