Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"I ran your IQFeed DDE vs. my broker vs. a level II window for some slow-moving options. I would see the level II quote change, then your feed update instantaneously. My broker's DDE, however, would take as much as 30 seconds to update. I am not chasing milliseconds, but half a minute is unacceptable." - Comment from Rob
"I'm very glad I switched to IQFeed. It's working perfectly with no lag, even during fast market conditions." - Comment from Andy via Email
"I noticed that ******* quotes locked up shortly after the interest rate announcement yesterday while yours stayed stable." - Comment from Ron in Utah
"I had always used ******* but for the past 2 weeks have been trying DTN IQFeed. Customer support has been extraordinary. They call just to make sure your problem hasn't recurred." - Comment from Public Forum
"Very impressed with the quality of your feed - ******* is a real donkey in comparison." - Comment from A.C. via Email
"With HUGE volume on AAPL and RIMM for 2 days, everyone in a trading room was whining about freezes, crashes and lag with *******, RealTick, TS and Cyber. InvestorRT with IQFeed was rock solid. I mean SOLID!" - Comment from Public IRC Chat
"Previously I was using *******. IQFeed is WAY more economical, and for my charting needs is just as good, if not better." - Comment from Public Forum Post
"It’s so nice to be working with real professionals!" - Comment from Len
"My broker in Davenport suggested I give you a try as he uses your service and says its the best." - Comment from Bill via RT Chat
"I've never had DTN go out on me since switching. ******* would go down a couple times every month when I was using them." - Comment from Bryce in AL.
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »Archive (2017 and earlier) »DTN.IQ Client Software Support »Error "Send Failed to Client" in IQConnectLog.txt
Author Topic: Error "Send Failed to Client" in IQConnectLog.txt (6 messages, Page 1 of 1)

tarasov
-Interested User-
Posts: 12
Joined: Oct 24, 2020


Posted: Aug 30, 2021 11:44 AM          Msg. 1 of 6
Hello.

I'm working with QIFeed client on the remote host. When I run a few requests (HIT type) simultaneously, I get in IQConnectLog errors that look like this:
 
STATUS LookupError 292 7 2021-08-29 17:03:35 Queuing HistoryData to Client: Bytes To Send 7243 : Bytes Sent 872 : Bytes Queued 6371
STATUS LookupError 292 7 2021-08-29 17:03:35 Send Failed to Client: Bytes To Send 13690 : Error 10035 : First 256 bytes of data H_0000000000,2021-06-14 04:09:00,16.300,16.250,16.250,16.250,3015,97,0,


But eventually, I get the same data as with one request without errors (I saved it in files and compared). I suppose that after an error in data sending IQFeed sends it again unless I get all the necessary data, but I'm not sure. Can someone confirm that I will get all data I need when I do parallel requests and see errors like this? Or give me some advice where can I read about it, may be some documentation?

DTN_Gary_Stephen
-DTN Guru-
Posts: 394
Joined: Jul 3, 2019


Posted: Aug 30, 2021 04:45 PM          Msg. 2 of 6
That is a classic "queueing" situation.

Error 10035 is socket error WSAEWOULDBLOCK, which basically means that the port is blocked when nothing is instructed to block it. This happens whenever the socket receive block is full, and IQFeed cannot send any more data to it. When this happens, IQFeed will hold onto the data and keep trying to re-send it, until it is able to do so, or until there is such a backlog of data that the IQConnect.exe app crashes.

The message "First 256 bytes of data H_0000000000,2021-06-14 04:09:00,16.300,16.250,16.250,16.250,3015,97,0," is what IQFeed was trying to send at the time.

So to answer your question, yes, IQFeed will hold onto any missed data and re-send it as long as it is able to do so. To minimize this, we recommend the following best practices, in no particular oder:



  • Use multi-threading. There should be different threads in your app to receive the data, parse it, and then act on it.

  • Make messages as efficient as possible. Use the SELECT UPDATE FIELDS command on Level 1 to get only the fields you need. Use tSYMBOL instead of wSYMBOL if you don't need bid/ask updates.

  • Having multiple simultaneous connections to IQFeed can help.

  • Increasing the size of the socket receive buffer can help.



Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

tarasov
-Interested User-
Posts: 12
Joined: Oct 24, 2020


Posted: Aug 31, 2021 07:36 AM          Msg. 3 of 6
Thank you, for your explanation. I'm already using some of these tips and I will think about others.

tarasov
-Interested User-
Posts: 12
Joined: Oct 24, 2020


Posted: Aug 31, 2021 10:43 AM          Msg. 4 of 6
Can you explain one more thing? In the phrase "Send Failed to Client", does "client" mean my application? Not IQFeed client (IQConnect.exe)?
And where can I find a detailed description of IQConnectLog file?

DTN_Gary_Stephen
-DTN Guru-
Posts: 394
Joined: Jul 3, 2019


Posted: Sep 16, 2021 09:34 AM          Msg. 5 of 6
Yes, "send failed to clilent" means it failed to send to your application, not to IQConnect.exe itself.

There isn't any documentation that further explains the IQConnectLog.txt file, but most of it is straightforward. The important thing is to turn on the right details for the kind of problem you are trying to solve. On the Logging tab of the Diagnostics app, you can select a combation of Level 1, Level 2, and Lookup information as appropriate to what process(es) you want to make a log of. Within each of those groups, "Requests" will log your requests to the API; "Data" will log the API's responses. These will appear in "FROM CLIENT" or "TO CLIENT" messages, respectively. Like this:

FROM CLIENT LookupRequest 6312 16 2020-12-23 17:42:50 HIT,QNG#C,60,20201223 105200,20201223 235959,,,,1

This is a historical API lookup command sent by the user. A response would look like:

TO CLIENT LookupData 6312 16 2020-12-23 17:42:50 2020-12-23 10:53:00,2.698,2.695,2.695,2.695,36869,34,
2020-12-23 10:54:00,2.698,2.696,2.696,2.698,36944,46,
2020-12-23 10:55:00,2.699,2.694,2.698,2.694,37273,87,
...etc...
TO CLIENT LookupRequest 6312 16 2020-12-23 17:42:50 !ENDMSG!,
TO CLIENT LookupData 6312 16 2020-12-23 17:42:50 !ENDMSG!,

This is good for troubleshooting situations where you are getting unexpected results.

"Error" will include any error messages, and it's advisable to include that if you are troubleshooting.

Searching the log file for "error" will turn up any errors that IQFeed detected. A typical one is:

TO CLIENT LookupError 3896 32 2020-12-23 17:54:07 E,Socket Error: 10038 (WSAENOTSOCK).,
!ENDMSG!,

The page https://docs.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2 lists all these socket error codes and what they mean. "WSAENOTSOCK" is a common one that means "a socket operation was attempted on something that is not a socket." Which in turn means that the socket wasn't active or wasn't initialized correctly.

"Debug" usually isn't necessary for troubleshooting purposes, unless directed by support. "System" includes internal system messages, which are often helpful but very detailed.

You don't want to log everything willy-nilly, because the file can become very large, and it can consume system resources. It is wise to only enable logging when you are tracking a problem. IQFeed support can also advise you on which elements to include, and can review a log for you.

I hope this is helpful! Let me know if you have any other questions!

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

tarasov
-Interested User-
Posts: 12
Joined: Oct 24, 2020


Posted: Sep 19, 2021 11:18 AM          Msg. 6 of 6
It was helpful, thank you very much!
 

 

Time: Thu April 25, 2024 1:47 AM CFBB v1.2.0 13 ms.
© AderSoftware 2002-2003