托管问题的数据库和DNS,但在杜曼 [英] hosting question for database and dns but in doman

查看:69
本文介绍了托管问题的数据库和DNS,但在杜曼的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个问题:
1-我的站点由于此问题而被暂停,发现您的站点正在消耗大量的Microsoft SQL Server进程资源.这通常是由于运行未优化的查询或使用消耗大量资源的持久连接而导致的资源"
如果有人可以帮助我

2-我想同时将我的网站放在两个不同的主机上
使用dns1和2进行第一次托管,以及使用dns 3和4进行第二次托管,是否工作正常,我如何知道此时其中一个正在连接

I have two questions:
1- my site was suspended due to this problem" it was found that your site was consuming a large amount of resources for the Microsoft SQL Server Process. This is often a result of running un-optimized queries or using persistent connections which consume large amounts of resources"
if any body can help me

2- i want to put my site on two different hosting at the same time is that possible
using dns1 and 2 for first hosting and dns 3 and 4 for second hosting is that working well or not and how could i know which one of them is connecting at this time
added data to which hosting is added

推荐答案

好,我将尽力回答您的两个问题.首先,该消息指出了问题所在.您正在运行繁重的查询,这给SQL Server带来了沉重的负担,因此您已被暂停.您将需要找出问题所在,然后加以解决.无论如何,您都应该监视查询,以确保查询有效且不会占用过多资源.如果您在本地拥有数据库副本,请运行所有查询并找出最慢的查询并找出原因.避免在WHERE子句中使用游标,循环,UDF等.此外,请确保正确使用索引并利用该索引.基本上,请确保您的数据库开发良好且运行状况良好.您也许还可以与您的托管公司联系,并获得一些帮助来确定哪些查询专门是问题所在.他们不会帮助您修复它们,但是他们可能能够告诉您问题所在.最后,听起来您应该查看整个数据库设置以及所有查询,UDF,存储过程和视图.另外,请检查您正在用代码开发并动态调用的所有查询.这些可能非常昂贵,因为服务器必须为每个服务器制定一个计划.尽量不要使用动态查询.

至于将站点托管在两个不同的主机上,是可以的,并且可以使用DNS进行.但是,这有一个问题.如果您的访问者正在创建数据,则无法以这种方式进行操作.如果它们返回您的站点但被定向到另一台主机,则除非您设置复制(大多数主机不允许复制到另一台主机),否则它们的数据将不会存在.我建议反对这种方法.相反,我认为您应该非常仔细地定义您的要求.您为什么要两台主机(写下来-我不需要知道,这是给您的).您希望获得什么好处?是正常运行时间吗?可靠性?故障转移?有了您的要求后,您就知道在托管服务提供商中寻找什么.如果您采用其他计划,许多提供商都将提供这些功能.您可能会看到的一个地方是Windows Azure.您可以扩展运行站点的计算机的数量,它们将处理平衡.他们还将在内部进行数据库复制.您还可以查看Amazon云.最后,大型托管服务提供商(例如Datapipe或Rackspace)提供了可能满足您要求的高端托管解决方案.
OK, I will do my best to answer both of your questions. First, the message states the problem. You were running heavy queries that put a large load on the SQL server so you were suspended. You are going to need to figure out which queries were the problems and then fix them. You should be monitoring your queries anyway to be sure they are efficient and don''t take up too many resources. If you have a copy of the database locally, run all of your queries and figure out which ones are the slowest and figure out why. Avoid cursors, loops, UDFs in WHERE clauses, etc. Also, make sure you use indexing properly and take advantage of that indexing. Basically, make sure your database is well developed and healthy. You might also be able to contact your hosting company and get some help in identifying which queries specifically were the problem. They won''t help you fix them, but they might be able to tell you which ones were the problem. In the end though, it sounds like you should review your entire database setup and all your queries, UDFs, stored procedures, and views. Also, review any queries that you are developing in code and calling dynamically. These can be very expensive because the server has to develop a plan for each one. Try not to use dynamic queries as much as possible.

As far as hosting your site on two different hosts, yes this is possible and yes you can do it using DNS. However, there is a problem with this. If your visitors are creating data, it won''t work to do it this way. If they come back to your site but get directed to the other host, their data won''t be there unless you set up replication (which most hosts won''t allow to another host). I would recommend against this approach. Instead, I think you should very carefully define your requirements. Why do you want two hosts (write it down - I don''t need to know, this is for you). What benefits are you looking to get? Is it uptime? Reliability? Failover? Once you have your requirements, you know what to look for in a hosting provider. A lot of providers offer these features if you go to a different plan. One place you could look would be Windows Azure. You can scale the number of machines you have running your site and they will handle the balancing. They will also do database replication internally. You could also look at the Amazon cloud as well. Finally, larger hosting providers such as Datapipe or Rackspace provide higher-end hosting solutions that might fit your requirements.


这篇关于托管问题的数据库和DNS,但在杜曼的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆