<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">Pasting my answer from the C++ list, because it's the same for any QF port:</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">I'm very familiar with ICE's SecDef/TCR interface, as I've maintained a client app that supports it for a decade.</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default"><div class="gmail_default"><font color="#000000">ICE's SecDef responses can be frickin' huge multipart beasts. I suspect you are requesting too much too fast, and then trying to handle them all on the QF event-processing thread. The messages are backing up in the queue, blocking the engine from responding to ICE in a timely fashion.</font></div><div class="gmail_default"><font color="#000000"><br></font></div><div class="gmail_default"><font color="#000000"><b>Suggestion 1:</b> All QF callbacks should return quickly. If you have expensive processing, delegate it to a separate worker thread. In your case: create a second worker thread to handle SecDefs. When you receive a SecDef, your OnMessage(SecDef) callback should push it into a queue that the worker thread will consume from.</font></div><div class="gmail_default"><font color="#000000"><b><br></b></font></div><div class="gmail_default"><font color="#000000"><b>Suggestion 2:</b> Put a delay between each SecDef Request you send. As high as you can tolerate. ICE will send those responses fast and frequently; you've gotta give your OnMessage() some room to handle them.</font></div><div class="gmail_default"><font color="#000000"><br></font></div><div class="gmail_default"><font color="#000000">I have a client whose users wants to send 50+ SecDefRequests every morning. Right now we have them staggering each request by 60 seconds. On the downside, it means they have to wait an hour to get the full set.</font></div><div class="gmail_default"><font color="#000000"><br></font></div><div class="gmail_default"><font color="#000000">(Some responses are bigger than others. If you wanted, you could look at the logs and figure out which Defs are huge and which are small, and only do the delay after requesting big ones.)</font></div><div class="gmail_default"><font color="#000000"><br></font></div><div class="gmail_default"><font color="#000000">-Grant</font></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 2, 2020 at 11:05 AM Veduruparthi Raju <<a href="mailto:rveduruparthi@gmail.com">rveduruparthi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I am developing a project in .NET to connect to ICE and i am using the QuickFIX engine version 1.9 and have a problem with the security definitions subscriptions.</div><div><br></div><div>I am subscribing to the security definitions and am receiving the responses (35=d) and in the onMessage method, i straight away processing the responses and writing them to the database directly. The problem is every 2 minutes my sessions logs out with the below error message. The connection forcibly closes by ICE.</div><div><br></div><div>I have contacted them and were saying to increase the heap size which i was not convinced and need help to understand what is the correct way of handling this in .NET since i know the market reference data is huge.</div><div><br></div><div>Appreciate your response.</div><div><br></div><div>System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host<br> at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)<br> --- End of inner exception stack trace ---<br> at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)<br> at QuickFix.SocketInitiatorThread.Send(String data)<br> at QuickFix.Session.Send(String message)<br> at QuickFix.Session.SendRaw(Message message, Int32 seqNum)<br> at QuickFix.Session.Next()<br> at QuickFix.Session.Next(MessageBuilder msgBuilder)<br> at QuickFix.SocketInitiatorThread.ProcessStream()<br> at QuickFix.SocketInitiatorThread.Read()</div><div><br></div><div>Thanks,</div></div>
_______________________________________________<br>
Quickfixn mailing list<br>
<a href="mailto:Quickfixn@lists.quickfixn.com" target="_blank">Quickfixn@lists.quickfixn.com</a><br>
<a href="http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com" rel="noreferrer" target="_blank">http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div><font size="2"><span style="background-color:rgb(0,0,0)"><span style="background-color:rgb(255,255,255)">Grant Birchmeier</span></span></font><font size="2"><font color="#3333ff"><br></font></font></div><div><font size="2"><b><font color="#3333ff"><span style="background-color:rgb(255,204,51)"><span style="background-color:rgb(255,204,102)"><span style="background-color:rgb(255,204,153)"><span style="background-color:rgb(255,255,255)"><span style="background-color:rgb(255,204,0)">Connamara Systems, LLC</span></span></span></span></span></font></b></font><br></div><div><font size="2"><b>Made-To-Measure Trading Solutions.</b></font></div><div><font size="2">Exactly what you need. No more. No less.</font><font size="2"><b><font color="#3333ff"><br></font></b></font></div><div><font size="2"><a href="http://connamara.com" target="_blank">http://connamara.com</a><br></font></div></div>
<br>
<span style="color:rgb(29,28,29);font-family:Slack-Lato,appleLogo,sans-serif;white-space:pre-wrap;background-color:white"><font size="2">This email, along with any attachments, is confidential. If you believe you received this message in error, please contact the sender immediately and delete all copies of the message. Thank you from Connamara Systems, LLC.</font></span>