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 will tell others who want to go into trading that DTN ProphetX is an invaluable tool, I don't think anyone can trade without it..." - Comment from Luther
"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
"I just wanted to let you know how fast and easy I found it to integrate IQFeed into our existing Java code using your JNI client. In my experience, such things almost never go so smoothly - great job!" - Comment from Nate
"The people at Nirvana have very nice things to say about your company and I can see why! Price and service is a potent combination." - Comment from Ed
"If you want customer service that answers the phone, your best bet is IQFeed. I cannot stop praising them or their technical support. They are always there for you, and they are quick. I have used ****** too but the best value is IQFeed." - Comment from Public Forum
"I just wanted to say how happy I am with your service. I was able to download the API docs last week and I was able to replicate Interactive Brokers historical bar queries and realtime bar queries over the weekend. That was about one of the fastest integrations that I've ever done and it works perfectly!!!!" - Comment from Jason via Email
"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'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
"The service is great, I see a noticeable improvement in my volume profiles over [broker]'s data feed" - Comment from Larry
"I would just like to say that IQFeed version 4 is running very well and I am very happy with its performance. I would also like to extend a big thanks for the fast and efficient help that I always receive. My questions and concerns are always addressed promptly. Way to go!" - Comment from Josh in CO.
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: Fri April 26, 2024 10:16 AM CFBB v1.2.0 9 ms.
© AderSoftware 2002-2003