Inserting duplicate keys in TimeoutSaga

32 views
Skip to first unread message

Rob Tennyson

unread,
Nov 19, 2009, 5:44:15 PM11/19/09
to masstransit-discuss
Given a fresh pull and build from the trunk, all I've done is switch
to using CE and run MassTransit.RuntimeServices.exe. After the
initialization, I start getting the below error over and over.

This isn't normal is it? My spike is timing out waiting for the
subscription service and I'm hoping it's related.

Could not execute command: INSERT INTO "TimeoutSaga" (CurrentState,
TimeoutAt, CorrelationId, Tag) VALUES (@p0, @p1, @p2, @p3)
A duplicate value cannot be inserted into a unique index. [ Table name
= TimeoutSaga,Constraint name = PK_TimeoutSaga ]
'System.Action`1[[System.Object, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089]]' threw an exception
consuming message
'MassTransit.Services.Timeout.Messages.ScheduleTimeout'
A duplicate value cannot be inserted into a unique index. [ Table name
= TimeoutSaga,Constraint name = PK_TimeoutSaga ]
An exception was thrown by a message consumer
MassTransit.Exceptions.MessageException: At least one consumer threw
an exception ---> A duplicate value cannot be inserted into a unique
index. [ Table name = TimeoutSaga,Constraint name = PK_TimeoutSaga ]
--- End of inner exception stack trace ---
at
MassTransit.Internal.ServiceBusReceiveContext.DeliverMessageToConsumers
(Object message) in c:\work\temp\masstransit\src\MassTransit\Internal
\ServiceBusReceiveContext.cs:line 136
at
MassTransit.Transports.Msmq.MsmqEndpoint.<>c__DisplayClass5.<>c__DisplayClass7.<ReceiveFromTransport>b__4
(Message m) in c:\work\temp\masstransit\src\Transports
\MassTransit.Transports.Msmq\MsmqEndpoint.cs:line 162

Dru Sellers

unread,
Nov 22, 2009, 7:59:00 AM11/22/09
to masstrans...@googlegroups.com
ok, feeling dumb. What is CE?
-d


--

You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To post to this group, send email to masstrans...@googlegroups.com.
To unsubscribe from this group, send email to masstransit-dis...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/masstransit-discuss?hl=.



Rob Tennyson

unread,
Nov 22, 2009, 9:43:08 AM11/22/09
to masstransit-discuss
http://en.wikipedia.org/wiki/SQL_Server_Compact

I noticed the CE elements (connection string and NH properties) in
MassTransit.RuntimeServices.exe.config which is great because we can't
install SQL Server (or express) on our desktops at work.

To the original post - I can't remember what I was doing wrong, but my
spike is running fine now despite the fact that these errors are
scrolling in the runtime services window. So there's no worries other
than the mass of red exceptions that might wash out an important
error.

On Nov 22, 6:59 am, Dru Sellers <d...@drusellers.com> wrote:
> ok, feeling dumb. What is CE?
> -d
>
> > masstransit-dis...@googlegroups.com<masstransit-discuss%2Bunsu...@googlegroups.com>
> > .

Dru Sellers

unread,
Nov 22, 2009, 10:18:36 AM11/22/09
to masstrans...@googlegroups.com
That's right chris put that in.I think there is a thread earlier that discusses that.
-d

To unsubscribe from this group, send email to masstransit-dis...@googlegroups.com.

Chris Patterson

unread,
Nov 22, 2009, 10:40:20 AM11/22/09
to masstrans...@googlegroups.com
Yeah, there are threads here and on the NSB list that talk about concurrency and sagas.

Depending upon your local, you could change the ConcurrentConsumers to 1 so that only one timeout message is processed at a time. The fact that there is a backlog of messages directed at the same saga makes me wonder if something is trying to do things a little too quickly in terms of timing though.


To unsubscribe from this group, send email to masstransit-dis...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/masstransit-discuss?hl=.



Chris Patterson



Rob Tennyson

unread,
Nov 22, 2009, 10:51:35 AM11/22/09
to masstrans...@googlegroups.com
Keep in mind from the original post that this was from a fresh pull and running only the runtime services. I hadn't created anything at that point and this was the first time I've ever had MT on my box.  So no sagas or anything at all created by me.

It does seem that I thought at one point there might be some existing funk in the CE database that came from source control so I dropped and rebuilt all of the tables.  Still go the dup key errors though.

I'll run again tomorrow with latest.  It might be a problem with the revision I pulled (don't remember what it was).
Reply all
Reply to author
Forward
0 new messages