I noticed that if I submit, say, five history data look up requests in rapid succession on the same socket, IQConnect will execute them one at a time in a serialized fashion. Even if I send all five requests together, IQConnect will not start processing all of them at the same time.
I can tell this because the responses come back like this:
(Long Pause) Response 1 (Long Pause) Response 2 (Long Pause) Response 3 (Long Pause) Response 4 (Long Pause) Response 5, as opposed to:
(Long Pause) Response 1 Response 2 Response 3 Response 4 Response 5, as you would expect if all the requests were submitted at approximately the same time.
But, I did notice that if I submit the five requests each on their own connection to the IQConnect history service, they will all complete at approximately the same time (indicating that they are submitted in parallel, as I hoped).
Given that IQFeed has been designed to handle multiple connections and application instances on a single machine in this way (ref:
http://forums.dtn.com/index.cfm?page=topic&topicID=3156), I updated my application to use a number of sockets to submit history data requests, rather than just one.
This was working fine for a while this afternoon, until I started getting the following error:
'Could not connect to History socket.'
Am I exceeding some connection rate limit behind the scenes?
While I was debugging my application, I may have caused a lot of connections to be created and torn down (more than would be typical in normal use). This was happening because I would start 10-50 connections every time the application starts up, and while debugging I frequently need to restart the application.
I can work on implementing some local rate limiting to prevent tripping whatever the limit is, but I'm not sure where the "goal posts" are.
-Joe