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 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
"I was with ******* for 4 years at $230 a month, this is a huge savings for me, GOD BLESS YOU PEOPLE," - Comment from T.S. via Email
"Thanks for following up with me. You guys do a great job in tech support." - Comment from Phelps
"IQFeed version 4 is a real screamer compared to anything else I have seen." - Comment from Tom
"I am very happy I changed. I love the product, but more so I am thrilled with Tech Support. You are knowledgeable, polite, pleasant and professional." - Comment from Pat
"Version 4.0.0.2 has been working well for me and I appreciate that it is now a much tighter client to work with. I feel I can go to press with my own application and rely on a stable platform" - Comment from David in IA.
"I was on the phone with a friend who uses CQG and right after the Fed announcement, CQG was as much as 30 seconds behind DTN.IQ. Some quotes were off by as much as 15-18 cents. Your feed never missed a beat." - Comment from Roger
"This is an excellent value, the system is generous (allowing for 500 stocks) and stable (and really is tick-by-tick), and the support is fantastic." - Comment from Shirin via Email
"I've been using IQFeed 4 in a multi-threaded situation for the last week or two on 2600 symbols or so with 100 simultaneous daily charts, and I have had 100% responsiveness." - Comment from Scott
"Can I get another account from you? I am tired of ******* going down so often" - Comment from George
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 »Product Support »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: 7
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 Evangelist-
Posts: 211
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: 7
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: 7
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 Evangelist-
Posts: 211
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: 7
Joined: Oct 24, 2020


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

 

Time: Tue September 21, 2021 9:47 PM CFBB v1.2.0 17 ms.
© AderSoftware 2002-2003