Author Topic: SambaPOS V2 keeps hanging at table screen  (Read 17734 times)

lemmings

  • Full Member
  • ***
  • Posts: 165
SambaPOS V2 keeps hanging at table screen
« on: September 07, 2013, 06:11:35 pm »
Hello

Three times today SambaPos has been freezing when a Table is selected and program is shutting down.  I extracted the error as follows:

----------------------------------------
Timestamp: 07/09/2013 12:29:09

Message: HandlingInstanceID: 99095623-d19c-4df5-a593-95eab0e00607
An exception of type 'System.Data.EntityException' occurred and was caught.
---------------------------------------------------------------------------
09/07/2013 13:29:07
Type : System.Data.EntityException, System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : The underlying provider failed on Open.
Source : System.Data.Entity
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void OpenStoreConnectionIf(Boolean, System.Data.Common.DbConnection, System.Data.Common.DbConnection, System.String, System.String, Boolean ByRef)
Stack Trace :    at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
   at System.Data.EntityClient.EntityConnection.Open()
   at System.Data.Objects.ObjectContext.EnsureConnection()
   at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
   at System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__2[TResult](IEnumerable`1 sequence)
   at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
   at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute(Expression expression)
   at System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1 source)
   at Samba.Infrastructure.Data.SQL.ReadOnlyEFWorkspace.Single[TSource,TResult](Int32 id, Expression`1 expression) in c:\Users\Stephen\lemmings125-alsdiner2\Samba.Infrastructure.Data\SQL\ReadOnlyEFWorkspace.cs:line 95
   at Samba.Persistance.Data.Dao.Single[TSource,TResult](Int32 id, Expression`1 expression) in c:\Users\Stephen\lemmings125-alsdiner2\Samba.Persistance.Data\Dao.cs:line 72
   at Samba.Services.MainDataContext.CloseTicket() in c:\Users\Stephen\lemmings125-alsdiner2\Samba.Services\MainDataContext.cs:line 446
   at Samba.Modules.TicketModule.TicketListViewModel.OnCloseTicketExecute(String obj)
   at Microsoft.Practices.Prism.Commands.DelegateCommand`1.<>c__DisplayClass6.<.ctor>b__2(Object o)
   at Microsoft.Practices.Prism.Commands.DelegateCommandBase.Execute(Object parameter)
   at Samba.Modules.TicketModule.TicketListViewModel.CloseTicket()
   at Samba.Modules.TicketModule.TicketListViewModel.OnPrintJobExecute(PrintJob printJob)
   at Microsoft.Practices.Prism.Commands.DelegateCommand`1.<>c__DisplayClass6.<.ctor>b__2(Object o)
   at Microsoft.Practices.Prism.Commands.DelegateCommandBase.Execute(Object parameter)
   at Microsoft.Practices.Prism.Commands.DelegateCommandBase.System.Windows.Input.ICommand.Execute(Object parameter)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Primitives.ToggleButton.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Additional Info:

MachineName : ALSDINER-TILL
TimeStamp : 07/09/2013 12:29:08
FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
AppDomainName : Samba.Presentation.exe
ThreadIdentity :
WindowsIdentity : ALSDINER-TILL\Blade User
   Inner Exception
   ---------------
   Type : System.Data.SqlClient.SqlException, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
   Message : Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
   Source : .Net SqlClient Data Provider
   Help link :
   Errors : System.Data.SqlClient.SqlErrorCollection
   Class : 11
   LineNumber : 0
   Number : -2
   Procedure :
   Server : ALSDINER-TILL\SAMBAPOS
   State : 0
   ErrorCode : -2146232060
   Data : System.Collections.ListDictionaryInternal
   TargetSite : Void OnError(System.Data.SqlClient.SqlException, Boolean)
   Stack Trace :    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
      at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
      at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
      at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
      at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()
      at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
      at System.Data.SqlClient.TdsParserStateObject.ReadByte()
      at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
      at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
      at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject)
      at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)
      at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
      at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
      at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
      at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
      at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
      at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
      at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
      at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
      at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
      at System.Data.SqlClient.SqlConnection.Open()
      at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)



Category: General

Priority: 0

EventId: 100

Severity: Error

Title:Enterprise Library Exception Handling

Machine: ALSDINER-TILL

App Domain: Samba.Presentation.exe

ProcessId: 3012

Process Name: C:\Program Files\SambaPOS2\Samba.Presentation.exe

Thread Name:

Win32 ThreadId:3016

Extended Properties:
----------------------------------------

I cannot find anything wrong with the SQL database and no errors are listed in Event Viewer, it does not appear to happen when a particular table is used either.

From what I can see it appears that my SQL Server had gone to sleep and SambaPos could not connect with it in the allocated time and hence the shutdown of SambaPos, should this be the default behavior

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: SambaPOS V2 keeps hanging at table screen
« Reply #1 on: September 07, 2013, 06:15:54 pm »
Timeout expired. It looks like a network issue.

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: SambaPOS V2 keeps hanging at table screen
« Reply #2 on: September 07, 2013, 06:52:27 pm »
hmm after googling for the error code it might not be a network issue. On call stack it seems client tries to login so it connected to server computer but sql server didn't responded. I think connection timeout is 15 seconds. Does it wait 15 seconds or it generates error immediately?

I've just noticed your comment under your post. AFAIK Sql Server does have sleep feature but it do not respond for a reason. Yes the default behavior is shutdown because connection timeout error is something unexpected for SambaPOS. Trying to reconnect few times might be an alternative solution but it generally useful on poor network conditions. I'll check if it is possible.

lemmings

  • Full Member
  • ***
  • Posts: 165
Re: SambaPOS V2 keeps hanging at table screen
« Reply #3 on: September 07, 2013, 07:22:12 pm »
There is probably a 15 second wait which makes it appear that Sambapos is frozen.

I'am going to switch anti-virus off tomorrow and see if the issue re-occurs as the logs are indicating there is also a shutdown in the Symantec Endpoint protection service which occurs although earlier than the Sambapos issue it could be connected.

It has only done this once this evening but it does appear more frequent all of a sudden - Im wondering if the database is getting too big for the hardware - the till is old and perhaps it is having trouble due to the size of the database (although it has only just reached 10mb)

It makes senses to shutdown but perhaps in V3 an error could be displayed to the user or something.

I troubleshoot HP Photo kiosk software and when this receives an unexpected error, it triggers an error pop-up, shutsdown the software and then restarts itself - just a thought for V3.

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: SambaPOS V2 keeps hanging at table screen
« Reply #4 on: September 07, 2013, 08:41:32 pm »
You are getting a connection timeout here. If it is a problem with database size you'll get query timeout. Yes I agree. Displaying better error message needed there.

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: SambaPOS V2 keeps hanging at table screen
« Reply #5 on: September 07, 2013, 09:02:25 pm »
Does the error happen only when SambaPOS hasn't been used for a while, like 30mins?
Do you have power management turned on like hard disk spin down?
SambaPOS - POS'n the World, one Terminal at a time.

lemmings

  • Full Member
  • ***
  • Posts: 165
Re: SambaPOS V2 keeps hanging at table screen
« Reply #6 on: September 09, 2013, 07:41:39 am »
Thanks for the replies.

I checked the Power Options, as I thought I only have screensaver set after 20mins of inactivity, the till never goes to sleep or hibernates and the disks do not shutdown.

I will continue to trawl through google as I its seems to be an issue between Norton Virus software and the SQL Server especially when the SQL Server goes to sleep after some inactivity.  The Virus software seems to stay up and run OK but after a period of inactivity with SambaPos, the first message I get is a Norton service has terminated unexpectedly and then SambaPos freezes and eventually shuts down.

I could try changing the settings of the SQL Server as a temporary fix as I dont want to switch off the anti-virus as the till is connected to the internet for the reservation system.