0

The code was working fine from the last 1 year properly but from last 1 week I am getting EOFException while Exceuting the select query:The query is as below

SELECT col1,col2,col3,col4 from Table where col1 in ('val1','val2','val3','val4')

The query is working fine when I am trying to exceute the query from SQL but the utility gets stuck when the Utility is trying to execute this query. When I restart the Utility,it starts working fine and then gets stuck again after 2-3 hours and gives EOFException after one hour.

For E.g,I have restarted the utility at 5:00 P.M,So,it works fine till 7:00 P.M and when it started to Execute this query at 7:00 P.M., the utility gets stuck and then gives EOFException at 8:00 P.M. The issue is occuring in Production but unable to find any root cause for this.

Some people using MySQL and Mariadb have recommended to increase the value of net_read_timeout variable but I am unable to increase it because I am using SQLServer 2012 and not able to find any such variable.

  • If the query works fine when executing in Microsoft SQL Server Management Studio, then "the utility" must be the issue. Can you specify this misterious "Utility" and do you have access to its source code? – Sander Aug 11 '20 at 11:26

1 Answers1

0

Assuming that your utility isn't on the same machine as the SQL Server, try and give this a go. Basically the Remote query timeout setting might be your culprit (which could be the case, considering you mention the one hour cutoff).

For SQL Server, right-click the server, and select properties. Then on the Connections tab, you can check and alter the value of "Remote query timeout" to 0. In my screenshot, the value is set to 600 (10 minutes). If yours shows 3600, you most likely found the reason for the cutoff.

enter image description here

SchmitzIT
  • 9,227
  • 9
  • 65
  • 92
  • Yes,the utility is in different server as that of the sql db.I have checked this timeout value and it is 600 in my sql server also – AYUSHI Agrahari Aug 11 '20 at 13:05
  • @AYUSHIAgrahari - I wouldn't know. I'm not a network engineer. But talk to your network team to hear if they might have configured something? – SchmitzIT Aug 12 '20 at 10:34