Bosna i Hercegovina



#1 03.06.2019-10:59
xl_kid Offline
Clan
Registrovan/a od: 11.11.2008-08:24
Komentari: 137


Subject: Timeout Expired - kako da povećam vreme na 60 ili više sec
Na SQL kada pokrenem upit izvrti ga za 45 ili više sec ali preko aplikacije (VB.NET) izbaci grešku (DOLE). Kako da povećam vreme? Gledao sam neka uputstva na netu ali ništa. Drži mi na 30 sec.

DownloadIzvorni kod (Text):
  1. See the end of this message for details on invoking
  2. just-in-time (JIT) debugging instead of this dialog box.
  3.  
  4. ************** Exception Text **************
  5. System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
  6.    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
  7.    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
  8.    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
  9.    at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
  10.    at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
  11.    at System.Data.SqlClient.SqlDataReader.get_MetaData()
  12.    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
  13.    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
  14.    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
  15.    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
  16.    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
  17.    at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
  18.    at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
  19.    at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
  20.    at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
  21.    at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
  22.    at WindowsApp2.Sinhronizacija_Oracle_DataSetTableAdapters.porudzbenice_sinhro_TableAdapter.FillBy_KCID(Porudzbenice_sinhroDataTable dataTable, Nullable`1 datum_isporuke, Int32 KCID)
  23.    at WindowsApp2.Dokumenta_narudzbe_prenos.DateTimePicker1_LostFocus(Object sender, EventArgs e)
  24.    at System.Windows.Forms.Control.OnLostFocus(EventArgs e)
  25.    at System.Windows.Forms.Control.WmKillFocus(Message& m)
  26.    at System.Windows.Forms.Control.WndProc(Message& m)
  27.    at System.Windows.Forms.DateTimePicker.WndProc(Message& m)
  28.    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  29.    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  30.    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  31. ClientConnectionId:f84b26c6-f014-4123-adaf-a2091aedbf48
  32. Error Number:-2,State:0,Class:11
  33.  
  34.  
  35. ************** Loaded Assemblies **************
  36. mscorlib
  37.     Assembly Version: 4.0.0.0
  38.     Win32 Version: 4.7.3416.0 built by: NET472REL1LAST_B
  39.     CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
  40. ----------------------------------------
  41. IN-IT App
  42.     Assembly Version: 1.0.0.0
  43.     Win32 Version: 1.0.0.0
  44.     CodeBase: file:///C:/Users/Miroslav/AppData/Local/Apps/2.0/YKMHL39Q.D62/4712JPVG.DTN/in-i..tion_0000000000000000_0002.0002_6fd19946264d275e/IN-IT%20App.exe
  45. ----------------------------------------
  46. Microsoft.VisualBasic
  47.     Assembly Version: 10.0.0.0
  48.     Win32 Version: 14.7.3056.0 built by: NET472REL1
  49.     CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
  50. ----------------------------------------
  51. System
  52.     Assembly Version: 4.0.0.0
  53.     Win32 Version: 4.7.3416.0 built by: NET472REL1LAST_B
  54.     CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
  55. ----------------------------------------
  56. System.Core
  57.     Assembly Version: 4.0.0.0
  58.     Win32 Version: 4.7.3362.0 built by: NET472REL1LAST_C
  59.     CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
  60. ----------------------------------------
  61. System.Windows.Forms
  62.     Assembly Version: 4.0.0.0
  63.     Win32 Version: 4.7.3324.0 built by: NET472REL1LAST_C
  64.     CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
  65. ----------------------------------------
  66. System.Drawing
  67.     Assembly Version: 4.0.0.0
  68.     Win32 Version: 4.7.3056.0 built by: NET472REL1
  69.     CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
  70. ----------------------------------------
  71. System.Configuration
  72.     Assembly Version: 4.0.0.0
  73.     Win32 Version: 4.7.3056.0 built by: NET472REL1
  74.     CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
  75. ----------------------------------------
  76. System.Xml
  77.     Assembly Version: 4.0.0.0
  78.     Win32 Version: 4.7.3056.0 built by: NET472REL1
  79.     CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
  80. ----------------------------------------
  81. System.Runtime.Remoting
  82.     Assembly Version: 4.0.0.0
  83.     Win32 Version: 4.7.3056.0 built by: NET472REL1
  84.     CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
  85. ----------------------------------------
  86. System.Data
  87.     Assembly Version: 4.0.0.0
  88.     Win32 Version: 4.7.3260.0 built by: NET472REL1LAST_C
  89.     CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
  90. ----------------------------------------
  91. System.Transactions
  92.     Assembly Version: 4.0.0.0
  93.     Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
  94.     CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
  95. ----------------------------------------
  96. System.EnterpriseServices
  97.     Assembly Version: 4.0.0.0
  98.     Win32 Version: 4.7.3056.0 built by: NET472REL1
  99.     CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
  100. ----------------------------------------
  101. System.Runtime.Caching
  102.     Assembly Version: 4.0.0.0
  103.     Win32 Version: 4.7.3056.0
  104.     CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Caching/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.Caching.dll
  105. ----------------------------------------
  106. System.Data.DataSetExtensions
  107.     Assembly Version: 4.0.0.0
  108.     Win32 Version: 4.7.3056.0 built by: NET472REL1
  109.     CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.DataSetExtensions/v4.0_4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll
  110. ----------------------------------------
  111. System.Numerics
  112.     Assembly Version: 4.0.0.0
  113.     Win32 Version: 4.7.3056.0 built by: NET472REL1
  114.     CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
  115. ----------------------------------------
  116.  
  117. ************** JIT Debugging **************
  118. To enable just-in-time (JIT) debugging, the .config file for this
  119. application or computer (machine.config) must have the
  120. jitDebugging value set in the system.windows.forms section.
  121. The application must also be compiled with debugging
  122. enabled.
  123.  
  124. For example:
  125.  
  126. <configuration>
  127.     <system.windows.forms jitDebugging="true" />
  128. </configuration>
  129.  
  130. When JIT debugging is enabled, any unhandled exception
  131. will be sent to the JIT debugger registered on the computer
  132. rather than be handled by this dialog box.
Ovaj komentar je mijenjan 1 puta. zadnja izmjena 04.06.2019-11:36 od strane Avko. ↑  ↓

#2 03.06.2019-14:01
Gjoreski Online
Super Moderator
Registrovan/a od: 02.02.2009-22:24
Komentari: 1,631


Subject: Re: Timeout Expired - kako da povećam vreme na 60 ili više sec
U vb6 sa adodb znam kako a u ovo novo ne znam slabo sam koristio.
Ja kod sebe za procedure koje traje dugo za poziv korisim ADODB.Command cod izgleda ovako:

DownloadIzvorni kod (Visual Basic):
  1.   Set cmd = New ADODB.Command
  2.     With cmd
  3.         .ActiveConnection = cn
  4.         .CommandTimeout = 3600
  5.         .CommandType = adCmdStoredProc
  6.         .CommandText = "spKunja"
  7.         .Parameters.Refresh
  8.         .Parameters("@Data") = Format(CDate(txtData), "yyyy.MM.dd") & " 12:00:00"
  9.         .Parameters("@Tip_Ponuda") = cboTip_Ponuda.BoundText
  10.     Set rsJadejna = .Execute
  11.     End With
  12.    
Ovaj komentar je mijenjan 1 puta. zadnja izmjena 03.06.2019-14:02 od strane Gjoreski. ↑  ↓

Stranice (1): 1


All times are GMT +01:00. Current time: 22.07.2019-09:04.