Adjust Cost Failure

  • Adjust Cost Failure

    Posted by Meenakshi Singh on January 15, 2018 at 6:22 am
    • Meenakshi Singh

      Member

      January 15, 2018 at 6:22 AM

      Hi,
      I have adjust cost running over night , however, since last two times it has been failing and I see the following message in the event log on my Application Server (General Message: The connection to the server has been lost. The application will close.). Can someone please advise what’s making it fail?

      Thanks in Advance,
      Meenakshi

      +
      Type: Microsoft.Dynamics.Nav.Client.NavClientClosingException Fatal: True ShowError: True Message: The connection to the server has been lost. The application will close. StackTrace: at Microsoft.Dynamics.Nav.Client.ConnectionStateManager.HandleCommunicationFailure[T](CallServerMethod`1 callServerMethod, ServerCallOptions options, Exception e, Int32 messageNumber, String sessionId) at Microsoft.Dynamics.Nav.Client.ConnectionStateManager.CallServer[T](CallServerMethod`1 callServerMethod, ServerCallOptions options) at Microsoft.Dynamics.Nav.Client.ConnectionStateManager.CallServer[T](CallServerMethod`1 callServerMethod) at Microsoft.Dynamics.Nav.Client.ServerInvocationHandler.CallServer[T](CallServerMethod`1 callServerMethod) at Microsoft.Dynamics.Nav.Client.ServiceConnection.CallServer[T](CallServerMethod`1 callServerMethod) at Microsoft.Dynamics.Nav.Client.ServiceConnectionBase.OpenForm(NavOpenFormArguments& mainForm, NavOpenFormArguments[]& subForms) at Microsoft.Dynamics.Nav.Client.ServiceConnection.Microsoft.Dynamics.Nav.Client.IService.OpenForm(NavOpenFormArguments& , NavOpenFormArguments[]& ) at Microsoft.Dynamics.Nav.Client.DataBinder.NstDataAccess.OpenForm(LogicalForm mainForm, Collection`1 subForms) at Microsoft.Dynamics.Nav.Client.UIPatterns.OnFormOpeningPattern.OpenForm(LogicalForm form) at Microsoft.Dynamics.Nav.Client.UIPatterns.OnFormOpeningPattern.FormBuilt(Object sender, EventArgs e) at Microsoft.Dynamics.Framework.UI.LogicalForm.OnFormBuilt(EventArgs e) at Microsoft.Dynamics.Framework.UI.LogicalForm.BuildForm() at Microsoft.Dynamics.Nav.Client.Builder.NavSessionHelper.BuildForm(LogicalForm form) at Microsoft.Dynamics.Nav.Client.FormBuilder.PageBuilder.Build(MasterPage definition, BindingManager bindingManager, UIBuilderContext context) at Microsoft.Dynamics.Nav.Client.FormBuilder.PageBuilder.Build(MasterPage definition, UIBuilderContext context) at Microsoft.Dynamics.Nav.Client.FormBuilder.UIBuildManager.BuildPage(MasterPage pageDef, UIBuilderContext context) at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSession.CreateLogicalForm(MasterPage metadata, FormState formState) at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSession.CreateLogicalForm(Int32 formId, FormState formState, Int32 retryCounter) at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSession.CreateLogicalForm(Int32 formId, FormState formState) at Microsoft.Dynamics.Nav.Client.Actions.NavOpenTaskPageAction.CreateForm(UISession uiSession, NavBindingManager parentBindingManager, FormState formState) at Microsoft.Dynamics.Nav.Client.Actions.NavOpenTaskPageAction.InvokeCore(Boolean async, LogicalControl logicalControl, Object state, UISession uiSession) at Microsoft.Dynamics.Framework.UI.LogicalAction.InvokeCoreWithErrorHandling(Boolean async, LogicalControl logicalControl, Object state, UISession uiSession) at Microsoft.Dynamics.Framework.UI.LogicalAction.DoInvoke(LogicalControl logicalControl, UISession uiSession) at Microsoft.Dynamics.Framework.UI.ActionControl.Invoke() at Microsoft.Dynamics.Framework.UI.Windows.ActionsHelper.<>c__DisplayClassa.<ModalitySafeInvoke>b__8() at Microsoft.Dynamics.Framework.UI.Windows.ActionsHelper.ModalitySafe(Action action) at Microsoft.Dynamics.Framework.UI.Windows.ActionsHelper.ModalitySafeInvoke(ActionControl actionControl) at Microsoft.Dynamics.Framework.UI.Windows.ActionControlAdapterBase.DefaultInvokeAction(LogicalControlAdapter adapter, ActionControl actionControl) at Microsoft.Dynamics.Framework.UI.Windows.ActionControlAdapterBase.DefaultInvokeAction(LogicalControlAdapter adapter) at Microsoft.Dynamics.Framework.UI.UX2006.WinForms.LogicalCommand.Execute(Object parameter) at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated) at System.Windows.Controls.Primitives.ButtonBase.OnClick() at System.Windows.Controls.Button.OnClick() at Microsoft.Windows.Controls.Ribbon.RibbonButton.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) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(ApplicationContext context) at Microsoft.Dynamics.Nav.Client.WinClient.NavWinFormsClientSession.RunMessagePump() at Microsoft.Dynamics.Nav.Client.WinClient.NavWinFormsClientSession.RunCore() at Microsoft.Dynamics.Framework.UI.Windows.ClientSessionBase.Run() at Microsoft.Dynamics.Nav.Client.WinClient.NavClientErrorHandler.ExecuteAndCatchExceptions(Func`1 execute) Source: Microsoft.Dynamics.Nav.Client.ServiceConnection HResult: -2146233088

      ——————————
      Meenakshi Singh
      Manager of Business Applications
      Home Market Foods, Inc.
      Norwood MA
      ——————————

    • Michael Carr

      Member

      January 15, 2018 at 9:27 AM

      Meenakshi,

      At  the risk of stating the obvious :

      1. Error sounds like the timeout error —– it’s not running to long,  by chance.

      2. Does it display when you run it manually?

      Michael

      ——————————
      Michael Carr
      VP , Finance
      Philadelphia Scientific LLC
      Montgomeryville PA
      ——————————
      ——————————————-

    • Meenakshi Singh

      Member

      January 15, 2018 at 10:44 AM

      Hi Michael, 

      Thank you for your response. Yes, it was taking too long which I didn’t understand why and even after that it wasn’t just timing out but erroring out.

      I did end up running it manually, which surprisingly took less time (after several segments) and we were able to figure out that error. It was a missing posting setup that had entries posted, however, that was deleted to avoid any future wrong posting but adjust cost kept bombing out looking for that.

      I think we are all set for now. I will run it again using the Job Q tonight, hopefully with success. 🙂

      Thanks,
      Meenakshi

      ——————————
      Meenakshi Singh
      Manager of Business Applications
      Home Market Foods, Inc.
      Norwood MA
      ——————————
      ——————————————-

    • Ramin Marghi

      Member

      January 15, 2018 at 11:19 AM

      Hey Meenakshi,

      If it fails again overnight and you have a separate service for your NAS/Job Queues (common practice in prior versions), you might want to check to see what that service tier’s settings are for SQL timeout (highlighted below) — if it’s too low on a long-running report, it can often encounter the issue you had above (i.e. timing out):

      ——————————
      Ramin Marghi , CPA, CGA
      CPA, CGA | ERP Consultant
      Catapult ERP
      VANCOUVER BC
      ——————————
      ——————————————-

    • Meenakshi Singh

      Member

      January 15, 2018 at 12:08 PM

      Good pointer, Ramin. I do have a separate service for Job Q so I will keep an eye on it. Hopefully, it won’t fail though as it only took us about 2.5 hours to run it manually. I do have the Job Q service set to timeout at 30 (default). Is that good?
       

      ——————————
      Meenakshi Singh
      Manager of Business Applications
      Home Market Foods, Inc.
      Norwood MA
      ——————————
      ——————————————-

    • Ramin Marghi

      Member

      January 15, 2018 at 12:18 PM

      Hmm — if the average run-time for that report is higher than 30 minutes, I think it’d be wise to have the timeout correspondingly be increased.

      If your typical run is 2.5 hours on a manual run, maybe bump that up to 3-4 hours for the timeout?

      ——————————
      Ramin Marghi , CPA, CGA
      CPA, CGA | ERP Consultant
      Catapult ERP
      VANCOUVER BC
      ——————————
      ——————————————-

    • Meenakshi Singh

      Member

      January 15, 2018 at 1:38 PM

      Got it. I am bit surprised though as it has taken more than 2 hours in the past and has completed successfully with the same time out setting.

      I guess I will take my changes for tonight (since I ran it once already & today is an OFF day (MLK Jr. Day) for us so no new postings) and see if it works.

      Fingers crossed. If error, I will change for the next run.

      Thanks, 
      Meenakshi

      ——————————
      Meenakshi Singh
      Manager of Business Applications
      Home Market Foods, Inc.
      Norwood MA
      ——————————
      ——————————————-

    • Kim Dallefeld

      Member

      January 15, 2018 at 2:19 PM

      Not sure what version you are on but I know at one point, Microsoft (Tom Blasidell specifically stated) had a version of the adjust cost for large data sets. This improved the performances allowed those with large number of item ledger entries to have successful execution.  You might check with your partner on this, if the other suggestions do not work.

      ——————————
      Kim Dallefeld
      VP Professional Services
      Syte Consulting Group
      kdallefeld@sytecg.com

      Past NAVUG Board Chairman
      NAVUG Programming Committee
      ——————————
      ——————————————-

    • Meenakshi Singh

      Member

      January 16, 2018 at 11:18 AM

      HI Kim, 

      We are using version 2013. We didn’t get a chance to run it via Job Q last night but have plans to run on Wednesday night so will find out if it’s successful or not. I will update with the resolution as well.

      That way we know to check the error in NAV if resolving that error does make it run successfully. Then I will test increasing the timeout as well as suggested by .

      Thanks,
      Meenakshi

      ——————————
      Meenakshi Singh
      Manager of Business Applications
      Home Market Foods, Inc.
      Norwood MA
      ——————————
      ——————————————-

    • Ron Ketterling

      Member

      January 16, 2018 at 7:20 AM

      Was there a server update that took place? Possibly the most likely scenario given Meltdown and Spectre.

      You may have a bad network port or cable.  Network or server issues could cause this.

      ——————————
      Ron Ketterling
      President
      Business Automation Specialists of MN, Inc.
      Minneapolis MN
      ——————————
      ——————————————-

    • Meenakshi Singh

      Member

      January 16, 2018 at 11:20 AM

      Hi @Ron,

      No server update.?

      Thanks,
      Meenakshi

      ——————————
      Meenakshi Singh
      Manager of Business Applications
      Home Market Foods, Inc.
      Norwood MA
      ——————————
      ——————————————-

    • Meenakshi Singh

      Member

      January 25, 2018 at 6:44 AM

      Hi, 
      I am back again. So, we did a couple of tests and still not getting adjust cost to run successfully. We added additional CPU power to our server that runs the JOBQ hoping that would speed up the processing but still no luck.
      Last night adjust cost was started at 11:30pm and it still didn’t finish until 6:30am this morning. It didn’t time out but I had to kill the process as it was blocking postings.

      Any ideas on how to make it run efficiently and successfully? We are able to run it manually in smaller chunks of items but then again someone has to baby-sit the process.

      Thank you for your suggestions,
      Meenakshi

      ——————————
      Meenakshi Singh
      Manager of Business Applications
      Home Market Foods, Inc.
      Norwood MA
      ——————————
      ——————————————-

    • Michael Carr

      Member

      January 26, 2018 at 9:41 AM

      Meenakshi,

      Any thing else running during the Adjust Batch slot that might be locking up a needed table in Adjust Cost, causing the Adjust Cost to hang?

      ——————————
      Michael Carr
      VP , Finance
      Philadelphia Scientific LLC
      Montgomeryville PA
      ——————————
      ——————————————-

    • Meenakshi Singh

      Member

      January 26, 2018 at 2:31 PM

      Nope, as a rule, we kick everyone out before the adjust cost runtime. and I run it after the backups have been completed.

      ——————————
      Meenakshi Singh
      Manager of Business Applications
      Home Market Foods, Inc.
      Norwood MA
      ——————————
      ——————————————-

    • Val Gameiro

      Member

      January 26, 2018 at 10:35 AM

      Another option would be to ask your IT department to look at the server event logs and see if there’s something else going on with the server that could be causing the problem.

      Another random thought, could you set several Qs and have each one handle a small segment of the data? Maybe divide by Item Category or something? Small chunks each time may at least get you part of the way there, and if the full Q is running into memory issues, then perhaps smaller chunks can fix that.

      ——————————
      Val Gameiro
      Senior NAV Analyst
      BPL Plasma Inc.
      Austin, Texas
      NAVUG Austin Chapter Leader
      ——————————
      ——————————————-

    • Meenakshi Singh

      Member

      January 26, 2018 at 2:33 PM

      I checked the event logs with my system admin and nothing substantial there. 🙁
      We are running the smaller chunks manually at this point but that might be the next step – to create job Q with different item category/type filters.

      Meenakshi

      ——————————
      Meenakshi Singh
      Manager of Business Applications
      Home Market Foods, Inc.
      Norwood MA
      ——————————
      ——————————————-

    • Bill Kilrain

      Member

      January 26, 2018 at 11:42 AM

      ?I feel your pain.  We have struggled with adjust cost since upgrading from 2009 to 2013R2.  We used to run every night, but since we now operate 3 shifts the only open time we have is Saturday night through Sunday night.  Our partner was able to do a few things that helped.  One was to create a custom processed that runs adjust cost in chunks.  That way, if it dies, at least it does not completely roll back.  The other thing was to throw hardware and software (SQL Enterprise) at it to keep it running in the available window.

      ——————————
      Bill Kilrain
      Director Planning and Budgeting
      Sign-Zone Inc.
      Brooklyn Center MN
      ——————————
      ——————————————-

    • Meenakshi Singh

      Member

      January 26, 2018 at 2:36 PM

      Yes, we have thrown extra hardware and additional CPU power to manage the load but it still is taking a long time and not completing.  I have to then work with my sysadmin to restart the SQL server and reset the database as just killing the job Q doesn’t help, unfortunately, it still keeps the database locked.

      Meenakshi

      ——————————
      Meenakshi Singh
      Manager of Business Applications
      Home Market Foods, Inc.
      Norwood MA
      ——————————
      ——————————————-

    • Katarzyna Rola

      Member

      January 30, 2018 at 5:52 AM

      Meenakshi,

      We had similar problem about a year ago. NAV was trying to adjust entries from 3 years ago to then. We noticed that Applied Entry to Adjust(5802) field was marked in Item Ledger Entry table on hundred of thousands entries. Since now, we have no idea what happened then. I spend four nights running Adjust Cost script partially to commit at least part of items valuation. It it workaround but it helped us.

      ——————————
      Katarzyna Rola
      Trio Line Polska Sp. z o. o.
      ——————————
      ——————————————-

    • Meenakshi Singh

      Member

      January 31, 2018 at 10:53 AM

      Hi Katarzyna,

      Thank you for your suggestion. Yes, that’s what we have been doping – running it manually for smaller intervals which it does complete successfully. What’s mind boggling to me is how come it went from 3-4 hours run to a 13-14 hours run? We are 24X7 operation and 13-14 hours are never available really.

      Adding extra resources to the server is not helping either. So, at this point running it manually in small intervals is the only option that’s working for us.

      Thanks,
       Meenakshi

      ——————————
      Meenakshi Singh
      Manager of Business Applications
      Home Market Foods, Inc.
      Norwood MA
      ——————————
      ——————————————-

    • Ron Ketterling

      Member

      February 1, 2018 at 7:14 AM

      Consider opening an instance with Microsoft through your partner. They may find the issue or it will give them the impetus to rewrite the code.

      ——————————
      Ron Ketterling
      President
      Business Automation Specialists of MN, Inc.
      Minneapolis MN
      ——————————
      ——————————————-

    • Jason Luchka

      Member

      February 2, 2018 at 7:48 AM

      ?We had a similar problem and opened a ticket with Microsoft to resolve the issue. What they discovered where that transfers that were shipped prior to our upgrade (shipped in 3.7B) but received after upgrade (2013), had some flags inversely set that were triggering adjust cost to run every time. There were thousands of value entries for each item ledger entry, and more posting every night. Our VAR assisted us in identifying which records needed updated and we used a combination of SQL and processing reports to “fix” things. Now our cost routine finished in as quickly as 10 minutes. sometimes it still takes a while (1 to 2 hours) depending on the daily activity, but the average is probably 30 minutes. Maybe you have a similar issue.

      ——————————
      Jason Luchka
      Programmer / Analyst
      FFR Merchandising, Inc.
      Twinsburg OH
      ——————————
      ——————————————-

    • Meenakshi Singh

      Member

      February 2, 2018 at 8:04 AM

      Thank you, Jason! I did consider that before upgrading (we did the same upgrade from 3.7B to 2013) and made sure all open transfer orders were fully shipped and received. Same thing on the PO and SO side, we didn’t receive or ship in the system if we knew we wouldn’t be able to invoice it fully. We either kept all orders open or posted them fully. 

      There was some manual management of such orders but it was worth it.

      For last 4 years, it has been working great. Problem just started when we implemented the ADCS solution for our WMS systems. It seems like it started taking longer and longer after that. One reason being I am not able to run it daily (I used to do that before WMS)  as we are 24X7 operation so we moved to run it only twice a week during sanitation. But lately it’s been taking about 8-10 hours which starts interfering with our operations. 

      I am sure it’s an entry some where but just don’t know how to find it. Also, we have been successful running it manually in smaller chunks but that means a sleepless night to make sure it finishes successfully for all items.

      I was hoping to manage it on my own, but I guess I have to bring it to my VAR attention.
      Meenakshi

      ——————————
      Meenakshi Singh
      Manager of Business Applications
      Home Market Foods, Inc.
      Norwood MA
      ——————————
      ——————————————-

    • Jason Luchka

      Member

      February 5, 2018 at 7:55 AM

      ?Before we knew the root cause, I modified the adjust cost routine process so that it would process up to 20 items at a time (batched adjustment), running on a scheduled job. It was a fairly simply modification, and avoided the need for someone to manually execute the job. Just a thought, in case that might work for you.

      ——————————
      Jason Luchka
      Programmer / Analyst
      FFR Merchandising, Inc.
      Twinsburg OH
      ——————————
      ——————————————-

    • Jason Luchka

      Member

      February 5, 2018 at 7:58 AM

      ?another modification we did was to capture in a table the starting Value Entry and ending Value Entry before and after our adjust cost routine was executed. With these specific entry nos., were able to both get a count of how many entries were created during adjustment, and also analyze the items that were adjusted (look up the VE, see what ILE it related to). This is what helped us identify our issues with the transfers.

      ——————————
      Jason Luchka
      Programmer / Analyst
      FFR Merchandising, Inc.
      Twinsburg OH
      ——————————
      ——————————————-

    • Meenakshi Singh

      Member

      February 7, 2018 at 8:14 AM

      Thanks Jason!  I might give it a try to capture the value entry no. to see how many entries are being generated by adjust cost.

      over the weekend , we took the chance to run it using Job Q and were able to successfully complete it within 7 hours, which is good. At least it completed successfully. We will see if the next run is reduced now. I still don’t see any error or any entries getting adjusted that would cause it to take so long.

      Thanks,
      Meenakshi

      ——————————
      Meenakshi Singh
      Manager of Business Applications
      Home Market Foods, Inc.
      Norwood MA
      ——————————
      ——————————————-

    Meenakshi Singh replied 6 years, 3 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘Adjust Cost Failure’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for people  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!