Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

SQL Command Timeout when uploading files
Last Post 08/08/2011 8:59 PM by Peter Donker. 3 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Jordan Widstrom
New Member
New Member
Posts:8


--
09/30/2010 12:22 AM

We are experiencing SQL command timeouts when uploading files. This seems to have gotten more frequent as our storage has grown. We are using SQL Server as the storage provider. Below is the error detail as shown in Event Viewer.

[b]AssemblyVersion[/b]: 04.09.04
[b]PortalID[/b]: 1
[b]PortalName[/b]: NoaNet BTOP Portal
[b]UserID[/b]: 80
[b]UserName[/b]: jordanw
[b]ActiveTabID[/b]: 208
[b]ActiveTabName[/b]: DMX Admin
[b]RawURL[/b]: /DMXAdmin/tabid/208/Default.aspx?Command=Core_Edit&CollectionId=2527&DMXRadUrid=5f418e73-976d-4a47-912a-613b55ae9a28
[b]AbsoluteURL[/b]: /Default.aspx
[b]AbsoluteURLReferrer[/b]: http://btop.noanet.net/DM...47-912a-613b55ae9a28
[b]UserAgent[/b]: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; MS-RTC LM 8; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
[b]DefaultDataProvider[/b]: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
[b]ExceptionGUID[/b]: 09dd16dc-3fc2-455e-a3b4-c49729d10c4c
[b]InnerException[/b]: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[b]FileName[/b]:
[b]FileLineNumber[/b]: 0
[b]FileColumnNumber[/b]: 0
[b]Method[/b]: System.Data.SqlClient.SqlConnection.OnError
[b]StackTrace[/b]:
[b]Message[/b]: DotNetNuke.Services.Exceptions.PageLoadException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> 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 Bring2mind.DNN.Modules.DMX.Services.Storage.SqlStorageProvider.VarBinarySource.Write(Byte[] buffer, Int64 offset, Int64 length) at Bring2mind.DNN.Modules.DMX.Services.Storage.SqlStorageProvider.VarBinaryStream.Write(Byte[] buffer, Int32 offset, Int32 count) at Bring2mind.DNN.Modules.DMX.Services.Storage.SqlStorageProvider.SqlStorageProvider.StoreFile(Int32 PortalId, String FilePath, String OriginalFilename, Boolean MoveFile) at Bring2mind.DNN.Modules.DMX.Services.Storage.StorageProvider.StoreFile(EntryInfo& entry, String FilePath, String OriginalFilename, Boolean MoveFile) at Bring2mind.DNN.Modules.DMX.Framework.UploadControl.CommitToStorage(EntryInfo& EntryToWriteTo) at Bring2mind.DNN.Modules.DMX.Controls.EditEntryPB.ᜀ() at Bring2mind.DNN.Modules.DMX.Controls.EditEntryPB.ᜀ(Object A_0, EventArgs A_1) at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
[b]Source[/b]:
[b]Server Name[/b]: MITWEB02

I've used SQL Profiler to trace what is happening to see if I can learn which command is timing out. It is usually a Blob.Write update where a chunk of the file is actually being written to the database. Below is an example. When running this directly in SQL Server Management Studio, I can sometimes reproduce the lag. Sometimes, the command will complete almost immediately; at other times, it can take up to a minute. (30 seconds appears to be the SQL command timeout used in the module.)

  sp_executesql N' update dbo.DMX_Repository set Blob.write(@buffer, @offset, @length) where BlobId = @key',N'@key int,@offset bigint,@length bigint,@buffer varbinary(576)',@key=1878,@offset=4520960,@length=576,@buffer=xxx 

Can anyone provide any insight? This is a very new and "beefed up" SQL server where data and log files, and the tempdb are all stored on different RAID arrays. I've been experimenting with SQL filegroups and index reorganizing/rebuilding, but have not cracked the case yet. We are now experiencing a SQL timeout almost every time a file is uploaded. Note that the actual upload of the file to the web server appears to be responsive. It is when writing the file in chunks to the SQL server. Note that I've been unable to successfully run the ReIndex Portal script from the module for some time. This is another issue that Peter believes he has a workaround/fix for in 5.3. I'm anxious to try that release to see if Reindex will help. Here is the link to the thead discussing that issue.

http://www.bring2mind.net...id/7321/Default.aspx

 

exec

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
10/06/2010 9:40 PM
Hi Jordan,

I don't have any magic insights here. It is new to me and if more people report in with this it is obviously a general issue. For now I hope it is just something local. I understand that you're using the SQL storage option.

Given the fact that I've used code that was considered "best practice" as I found it on the web, maybe there are other people outside DNN/DMX that have run into this. Did you Google on this as well?

Peter
Brock Davis
New Member
New Member
Posts:1


--
07/28/2011 9:48 PM
Jordan, Peter:

I am running into the same issue, was this ever resolved?

-Brock
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
08/08/2011 8:59 PM
Hi Brock,

I don't know. But I'd repeat what I said earlier. There is AFAIK no code deficiency here. If there are performance issues I'd begin looking at the server configuration.

Peter
You are not authorized to post a reply.