Showing posts with label environment. Show all posts
Showing posts with label environment. Show all posts

Monday, March 26, 2012

Merge Agent Failure

Hello,
We've been using merge replication now in a live customer environment for
several months with only one major issue; every several days to several
times a day, the merge agent fails with the following error message:
The process could not enumerate changes at the 'Publisher'.
(Source: Merge Replication Provider (Agent); Error number: -2147200999)
Transaction (Process ID 152) was deadlocked on lock resources with another
process and has been chosen as the deadlock victim. Rerun the transaction.
(Source: ABC-DB2 (Data source); Error number: 1205)
Sometimes the agent fails with the message "The process could not enumerate
changes at the 'Subscriber'." but other than that, it's the same every
single time. We have found that each time this occurs, we can simply
restart the agent and it starts up just fine. We have even gone so far as
to put a job in place at each customer site to restart the merge agent upon
failure, but our application must be able to handle this failure as well
which requires more work arounds.
Is there any way to solve this problem? At this point, just through trial
and error, we've reduced the frequency of the failure by setting
NumDeadlockRetries to it's maximum, reduced SrcThreads and DestThreads to
their minimum, set both UploadGenerationsPerBatch and
DownloadGenerationsPerBatch to 2000, QueryTimeout to 300 and PollingInterval
to 60 but we cannot eliminate the error.
I see Hilary's comment on 11/21 that these errors are normally transitory
and to just restart the merge agent, but this is not so simple for us in our
environment. What we really need to do is stop the problem from happening.
What is causing this error? Is there any way to get completely rid of this
problem? Does anyone know if the problem has been solved in SQL Server
2005?
Thanks in advance for any help you might be able to provide.
Thanks,
Marshall
I'd try monitoring for deadlocks. This can be donw through profiler
(particluarly well in SQl Server 2005 with the deadlock graphs), or using
trace flags. DBCC TRACEON(1204,1205,3605,-1) on the publisher then run the
merge agent. Check SQL Server logs for the deadlock information. It isn't in
especailly well-formatted style but the TSQL causing the problems can be
gained ths way. Once you've got the info, you just need to turn off the trace
flags.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||There are many sources of this error. One of them could be too many
concurrently running merge agents. Another could be the complexity of your
join filters.
How many subscribers do you have? On what criteria are you filtering?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Marshall" <MBCDev> wrote in message
news:gsudna7sf6fG6gDenZ2dnUVZ_vydnZ2d@.wideopenwest .com...
> Hello,
> We've been using merge replication now in a live customer environment for
> several months with only one major issue; every several days to several
> times a day, the merge agent fails with the following error message:
> The process could not enumerate changes at the 'Publisher'.
> (Source: Merge Replication Provider (Agent); Error number: -2147200999)
> ----
> --
> Transaction (Process ID 152) was deadlocked on lock resources with another
> process and has been chosen as the deadlock victim. Rerun the transaction.
> (Source: ABC-DB2 (Data source); Error number: 1205)
> ----
> --
> Sometimes the agent fails with the message "The process could not
> enumerate
> changes at the 'Subscriber'." but other than that, it's the same every
> single time. We have found that each time this occurs, we can simply
> restart the agent and it starts up just fine. We have even gone so far as
> to put a job in place at each customer site to restart the merge agent
> upon
> failure, but our application must be able to handle this failure as well
> which requires more work arounds.
> Is there any way to solve this problem? At this point, just through trial
> and error, we've reduced the frequency of the failure by setting
> NumDeadlockRetries to it's maximum, reduced SrcThreads and DestThreads to
> their minimum, set both UploadGenerationsPerBatch and
> DownloadGenerationsPerBatch to 2000, QueryTimeout to 300 and
> PollingInterval
> to 60 but we cannot eliminate the error.
> I see Hilary's comment on 11/21 that these errors are normally transitory
> and to just restart the merge agent, but this is not so simple for us in
> our
> environment. What we really need to do is stop the problem from
> happening.
> What is causing this error? Is there any way to get completely rid of
> this
> problem? Does anyone know if the problem has been solved in SQL Server
> 2005?
> Thanks in advance for any help you might be able to provide.
>
> Thanks,
> Marshall
>
|||Hello Hilary,
We have only one merge agent running with one subscriber to the publisher.
Also, we do no filtering whatsoever - it's purely table to table
replication, but on all tables (over 700) in the database. I just read
Paul's suggestion on trying to research the cause of the deadlock itself. I
will give that a try to see if I can find any additional information.
Thanks,
Marshall
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uLGDjxy$FHA.3852@.TK2MSFTNGP14.phx.gbl...
> There are many sources of this error. One of them could be too many
> concurrently running merge agents. Another could be the complexity of your
> join filters.
> How many subscribers do you have? On what criteria are you filtering?
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Marshall" <MBCDev> wrote in message
> news:gsudna7sf6fG6gDenZ2dnUVZ_vydnZ2d@.wideopenwest .com...
>
|||Thanks Paul,
I will give this a try and see if I can find out anything. I will
definitely let you and the rest of the newsgroup know of anything we
discover.
Thanks again,
Marshall
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:0A4FA093-B706-4353-AA2C-25972E2DD7DD@.microsoft.com...
> I'd try monitoring for deadlocks. This can be donw through profiler
> (particluarly well in SQl Server 2005 with the deadlock graphs), or using
> trace flags. DBCC TRACEON(1204,1205,3605,-1) on the publisher then run the
> merge agent. Check SQL Server logs for the deadlock information. It isn't
> in
> especailly well-formatted style but the TSQL causing the problems can be
> gained ths way. Once you've got the info, you just need to turn off the
> trace
> flags.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||I have the same problem and have been dealing with that for months without
any solution. But I didn't have this problem until I applied a hotfix that
Microsoft gave me. I did the trace and I know in what table I'm having the
deadlock. I opened a case with Microsoft and after trying and trying
thousands of things they were not able to help and said I need to change the
run continuously parameter to make replication work every some minutes. But
for the conditions of the business we can't do this change, we need to run
it continuously and here I'm dealing with this problem. I hope you have
better lock. Now I'm use to wake up in the middle of the night several times
to start the replication so the business process can continue.
Thanks
"Marshall" <MBCDev> wrote in message
news:gsudna7sf6fG6gDenZ2dnUVZ_vydnZ2d@.wideopenwest .com...
> Hello,
> We've been using merge replication now in a live customer environment for
> several months with only one major issue; every several days to several
> times a day, the merge agent fails with the following error message:
> The process could not enumerate changes at the 'Publisher'.
> (Source: Merge Replication Provider (Agent); Error number: -2147200999)
> ----
> --
> Transaction (Process ID 152) was deadlocked on lock resources with another
> process and has been chosen as the deadlock victim. Rerun the transaction.
> (Source: ABC-DB2 (Data source); Error number: 1205)
> ----
> --
> Sometimes the agent fails with the message "The process could not
> enumerate
> changes at the 'Subscriber'." but other than that, it's the same every
> single time. We have found that each time this occurs, we can simply
> restart the agent and it starts up just fine. We have even gone so far as
> to put a job in place at each customer site to restart the merge agent
> upon
> failure, but our application must be able to handle this failure as well
> which requires more work arounds.
> Is there any way to solve this problem? At this point, just through trial
> and error, we've reduced the frequency of the failure by setting
> NumDeadlockRetries to it's maximum, reduced SrcThreads and DestThreads to
> their minimum, set both UploadGenerationsPerBatch and
> DownloadGenerationsPerBatch to 2000, QueryTimeout to 300 and
> PollingInterval
> to 60 but we cannot eliminate the error.
> I see Hilary's comment on 11/21 that these errors are normally transitory
> and to just restart the merge agent, but this is not so simple for us in
> our
> environment. What we really need to do is stop the problem from
> happening.
> What is causing this error? Is there any way to get completely rid of
> this
> problem? Does anyone know if the problem has been solved in SQL Server
> 2005?
> Thanks in advance for any help you might be able to provide.
>
> Thanks,
> Marshall
>

Monday, March 12, 2012

Memory usage

We have about 40 SQL Servers in our environment, and none of them use 2 GB o
f
RAM - in fact they all use between 1.6 and 1.7 GB.
Our configuration option is set to dynamically use memory - and our
databases are as large as 100GB.
Any ideas?How much physical RAM is in the machines?
Himanshu wrote:
> We have about 40 SQL Servers in our environment, and none of them use 2 GB
of
> RAM - in fact they all use between 1.6 and 1.7 GB.
> Our configuration option is set to dynamically use memory - and our
> databases are as large as 100GB.
> Any ideas?|||All our machines have either 3GB or 4GB of physical RAM
"davconts@.gmail.com" wrote:

> How much physical RAM is in the machines?
>
> Himanshu wrote:
>|||How are you measuring the memory allocation?
And have you used the /3gb start up parameter on the boxes with 4GB?
What you are reading is about right for the 3GB boxes -2Gb for SQL, 1GB for
the OS. The /3GB option will give SQL Server 3GB on the boxes with 4GB
memory.
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"Himanshu" <Himanshu@.discussions.microsoft.com> wrote in message
news:BC386A30-D58F-4D9B-923F-29EBD5884477@.microsoft.com...[vbcol=seagreen]
> All our machines have either 3GB or 4GB of physical RAM
> "davconts@.gmail.com" wrote:
>|||Himanshu wrote:
> We have about 40 SQL Servers in our environment, and none of them use 2 GB
of
> RAM - in fact they all use between 1.6 and 1.7 GB.
> Our configuration option is set to dynamically use memory - and our
> databases are as large as 100GB.
> Any ideas?
>
What version of SQL server and Windows are you running? Standard SQL
server 2000 is limited to 2GB and in real life it's normally using max
~1,8 GB.
Regards
Steen Schlüter Persson
Databaseadministrator / Systemadministrator|||SQL Server will always reserve up to 384MB of memory at start up for the
MemToLeave portion of memory. So if you are using Task Manager to view
memory usage it looks like SQL Server only uses about 1.7GB and this is
normal.
http://msdn.microsoft.com/library/d...ev_01262004.asp
--
Andrew J. Kelly SQL MVP
"Himanshu" <Himanshu@.discussions.microsoft.com> wrote in message
news:1ECD2B49-A3C1-4466-A752-56BF9515502A@.microsoft.com...
> We have about 40 SQL Servers in our environment, and none of them use 2 GB
> of
> RAM - in fact they all use between 1.6 and 1.7 GB.
> Our configuration option is set to dynamically use memory - and our
> databases are as large as 100GB.
> Any ideas?|||Thank you all for your responses. We have SQL 2000 Standard running on
Windows 2000 Server.
It is possible configure SQL 2000 Standard to use 3 GB?
"Himanshu" wrote:

> We have about 40 SQL Servers in our environment, and none of them use 2 GB
of
> RAM - in fact they all use between 1.6 and 1.7 GB.
> Our configuration option is set to dynamically use memory - and our
> databases are as large as 100GB.
> Any ideas?|||No, that configuration is limited to 2 GB.
See:
http://www.sql-server-performance.c...nfiguration.asp
--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"Himanshu" <Himanshu@.discussions.microsoft.com> wrote in message
news:A7CCDE8F-1B2E-4C7A-867A-86891BF39F6C@.microsoft.com...[vbcol=seagreen]
> Thank you all for your responses. We have SQL 2000 Standard running on
> Windows 2000 Server.
> It is possible configure SQL 2000 Standard to use 3 GB?
>
> "Himanshu" wrote:
>

Friday, March 9, 2012

Memory usage

We have about 40 SQL Servers in our environment, and none of them use 2 GB of
RAM - in fact they all use between 1.6 and 1.7 GB.
Our configuration option is set to dynamically use memory - and our
databases are as large as 100GB.
Any ideas?How much physical RAM is in the machines?
Himanshu wrote:
> We have about 40 SQL Servers in our environment, and none of them use 2 GB of
> RAM - in fact they all use between 1.6 and 1.7 GB.
> Our configuration option is set to dynamically use memory - and our
> databases are as large as 100GB.
> Any ideas?|||All our machines have either 3GB or 4GB of physical RAM
"davconts@.gmail.com" wrote:
> How much physical RAM is in the machines?
>
> Himanshu wrote:
> > We have about 40 SQL Servers in our environment, and none of them use 2 GB of
> > RAM - in fact they all use between 1.6 and 1.7 GB.
> >
> > Our configuration option is set to dynamically use memory - and our
> > databases are as large as 100GB.
> >
> > Any ideas?
>|||How are you measuring the memory allocation?
And have you used the /3gb start up parameter on the boxes with 4GB?
What you are reading is about right for the 3GB boxes -2Gb for SQL, 1GB for
the OS. The /3GB option will give SQL Server 3GB on the boxes with 4GB
memory.
--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"Himanshu" <Himanshu@.discussions.microsoft.com> wrote in message
news:BC386A30-D58F-4D9B-923F-29EBD5884477@.microsoft.com...
> All our machines have either 3GB or 4GB of physical RAM
> "davconts@.gmail.com" wrote:
>> How much physical RAM is in the machines?
>>
>> Himanshu wrote:
>> > We have about 40 SQL Servers in our environment, and none of them use 2
>> > GB of
>> > RAM - in fact they all use between 1.6 and 1.7 GB.
>> >
>> > Our configuration option is set to dynamically use memory - and our
>> > databases are as large as 100GB.
>> >
>> > Any ideas?
>>|||This is a multi-part message in MIME format.
--000104030503020007090500
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Himanshu wrote:
> We have about 40 SQL Servers in our environment, and none of them use 2 GB of
> RAM - in fact they all use between 1.6 and 1.7 GB.
> Our configuration option is set to dynamically use memory - and our
> databases are as large as 100GB.
> Any ideas?
>
What version of SQL server and Windows are you running? Standard SQL
server 2000 is limited to 2GB and in real life it's normally using max
~1,8 GB.
Regards
Steen Schlüter Persson
Databaseadministrator / Systemadministrator
--000104030503020007090500
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Himanshu wrote:
<blockquote cite="mid1ECD2B49-A3C1-4466-A752-56BF9515502A@.microsoft.com"
type="cite">
<pre wrap="">We have about 40 SQL Servers in our environment, and none of them use 2 GB of
RAM - in fact they all use between 1.6 and 1.7 GB.
Our configuration option is set to dynamically use memory - and our
databases are as large as 100GB.
Any ideas?
</pre>
</blockquote>
<font size="-1"><font face="Arial">What version of SQL server and
Windows are you running? Standard SQL server 2000 is limited to 2GB and
in real life it's normally using max ~1,8 GB.<br>
<br>
<br>
-- <br>
Regards<br>
Steen Schlüter Persson<br>
Databaseadministrator / Systemadministrator<br>
</font></font>
</body>
</html>
--000104030503020007090500--|||SQL Server will always reserve up to 384MB of memory at start up for the
MemToLeave portion of memory. So if you are using Task Manager to view
memory usage it looks like SQL Server only uses about 1.7GB and this is
normal.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqldev/html/sqldev_01262004.asp
--
Andrew J. Kelly SQL MVP
"Himanshu" <Himanshu@.discussions.microsoft.com> wrote in message
news:1ECD2B49-A3C1-4466-A752-56BF9515502A@.microsoft.com...
> We have about 40 SQL Servers in our environment, and none of them use 2 GB
> of
> RAM - in fact they all use between 1.6 and 1.7 GB.
> Our configuration option is set to dynamically use memory - and our
> databases are as large as 100GB.
> Any ideas?|||Thank you all for your responses. We have SQL 2000 Standard running on
Windows 2000 Server.
It is possible configure SQL 2000 Standard to use 3 GB?
"Himanshu" wrote:
> We have about 40 SQL Servers in our environment, and none of them use 2 GB of
> RAM - in fact they all use between 1.6 and 1.7 GB.
> Our configuration option is set to dynamically use memory - and our
> databases are as large as 100GB.
> Any ideas?|||No, that configuration is limited to 2 GB.
See:
http://www.sql-server-performance.com/jc_system_storage_configuration.asp
--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"Himanshu" <Himanshu@.discussions.microsoft.com> wrote in message
news:A7CCDE8F-1B2E-4C7A-867A-86891BF39F6C@.microsoft.com...
> Thank you all for your responses. We have SQL 2000 Standard running on
> Windows 2000 Server.
> It is possible configure SQL 2000 Standard to use 3 GB?
>
> "Himanshu" wrote:
>> We have about 40 SQL Servers in our environment, and none of them use 2
>> GB of
>> RAM - in fact they all use between 1.6 and 1.7 GB.
>> Our configuration option is set to dynamically use memory - and our
>> databases are as large as 100GB.
>> Any ideas?