Bruce Liu
unread,Apr 8, 2013, 5:13:48 AM4/8/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web...@googlegroups.com
Hi,
We got this error in our production environment.
The stack trace from windows event log is:
<ExceptionType>System.Net.WebException, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>The operation has timed out</Message>
<StackTrace>
at FM.WebSync.Publisher.PerformPublish(Publication[] requestPublications)
at FM.WebSync.Publisher.Publish(Publication publication)
at [mynamespace].WebSync4Publisher.PublishEvent()
My code is:
private static readonly string WebSyncServerUrl = ConfigurationManager.AppSettings["PublisherURL"];
private static readonly Publisher publisher = new Publisher(WebSyncServerUrl);
public void PublishEvent(short sourceId, short param1, byte param2, short param3, string jsonString)
{
var jsonEvent = new JsonEvent {EventId = eventId, JsonStr = jsonString};
var jsonEventString = JsonConvert.SerializeObject(jsonEvent);
var channel = string.Format("/S{0}S{1}M{2}", param1, param2, param3);
logger.Info(string.Format("PublishEvent Channel {0}, eventId {1}", channel, eventId));
publisher.Publish(channel, jsonEventString);
}
Another issue is sometimes we found this single line taking 200 - 300 milliseconds when there is only one single message in the Publish() method.
publisher.Publish(channel, jsonEventString);
Did I do anything wrong?
Thanks.
Bruce