NeatUpload / Hitone SqlServerUploader sporadic timeout issue

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

NeatUpload / Hitone SqlServerUploader sporadic timeout issue

Glenn Mason

Hi Dean-

I am wondering if you can give me any quick pointers on where I might focus my effort in trying to pinpoint or otherwise alleviate a sporadic timeout issue I am seeing with NeatUpload. For background, I am using NeatUpload and streaming my uploads to a SQL Server database using Hitone SqlServerUploader; here are the versions I am currently using:

Brettle.Web.NeatUpload.dll -- 1.3.3438.26498

Hitone.Web.SqlServerUploader.dll -- 1.0.0.0

The application has been in production for more than a year and was upgraded 6 months ago to the newer Neatupload version. Here is the stack trace of the errors I am seeing:

System.IO.IOException: Sql IO failed in SqlServerBlobStream.Write ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Hitone.Web.SqlServerUploader.SqlServerBlobStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   --- End of inner exception stack trace ---
   at Hitone.Web.SqlServerUploader.SqlServerBlobStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.Security.Cryptography.CryptoStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at Brettle.Web.NeatUpload.Internal.Module.FilteringWorkerRequest.WriteParsedToOutputStream()
   at Brettle.Web.NeatUpload.Internal.Module.FilteringWorkerRequest.CopyUntilBoundary()
   at Brettle.Web.NeatUpload.Internal.Module.FilteringWorkerRequest.ParseOrThrow()
   at Brettle.Web.NeatUpload.Internal.Module.FilteringWorkerRequest.ParseMultipart()
   at Brettle.Web.NeatUpload.UploadHttpModule.WaitForUploadToComplete()
   at Brettle.Web.NeatUpload.UploadHttpModule.Application_ResolveRequestCache(Object sender, EventArgs e)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 

Any help, pointers or info that give me a handdle on this would be greatly appreciated.

Glenn

 

ps - thanks for all of your hard work with Neatupload.

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NeatUpload / Hitone SqlServerUploader sporadic timeout issue

Dean Brettle
Administrator
This looks like your DB server or web server is overloaded and can't save the file in a reasonable amount of time (the default timeout is 30 secs).  I don't think it is necessarily related to NeatUpload.  If you need to increase the timeout, I think you'd need to modify the NeatUpload source to add:

_writeCommand.CommandTimeout = the desired timeout time in secs or 0 for no timeout

after:

_writeCommand = _connection.CreateCommand();

in SqlServerBlobStream.cs

--Dean
Loading...