Solved

DeviceHub Restart, Setup and IIS issue


Hello,

I have 2 DH running very well on one server for my client, but I do run into some issues when the Application Pool (IIS) recycles, Acumatica restarts, but sometimes it takes longer than 30 seconds to come up again. My client works 24 hrs. a day, and they are calling at very odd hours because DH hangs due to this issue. First, let me show you what they are getting and how everything ties:

 

1- This is the error from DeviceHub:
 

([Printer] [Error] Hub connection was closed with System.TimeoutException error: Couldn't reconnect within the configured timeout of 00:00:30, disconnecting.. Stack trace: )

 

2- Acumatica’s System Monitor reports this:

 

 

3- Windows System Event Viewer, reports this:

Date 7/4/2022,, time: 12:43:

A worker process with process id of '6236' serving application pool 'DefaultAppPool' has requested a recycle because the worker process reached its allowed processing time limit.
Source WAS, Event ID 5074.

 

QUESTIONS:

When I look at the DH setup, and the error from DH says: ([Printer] [Error] Hub connection was closed with System.TimeoutException error: Couldn't reconnect within the configured timeout of 00:00:30, disconnecting.. Stack trace: ) is the setup below wrong?

 

When the IIS recycles, it makes the webpage to reset and sometimes the page won’t come up within 30 seconds, leaving the DH hanging because it cannot longer connect to the URL, After it hangs, no  one can print until somebody resets DH by simply going in to DH Configuration and back out. DH will not restart by itself or even try again until it reconnects to URL.

Is there a way to fix this, to make DH try to reconnect every so often?

In IIS we have the option to change the Regular Time Interval to 0 in Recycling setting, and set the time we want the recycling to happen, but we have 2 issues with that. My client works 7 days a week, 24hrs. a day, no downtime and if the DH doesn’t start up, then we have phone calls they can’t print at any time during the day or night.

 

 

Does anyone know how to recycle w/o affecting the reset? Apparently you have to recycle every so often, but can we leave w/o doing it? I know they refer to the recycling agent as “worker” - can a worker take over the other worker to carry on?

I appreciate any help on this matter.

 

Thank you

 

icon

Best answer by willie98 31 October 2022, 13:38

View original

10 replies

Userlevel 6
Badge +5

@willie98 I have been frustrated with DeviceHub for some other reasons I’ve posted on here previously, regarding its architecture and “structural slowness” with regards to sending print jobs from the ERP to DeviceHub.

I could show you how to make this more redundant by failing over to a service like PrintNode (https://www.printnode.com/en) if we detect an outage condition with DeviceHub. This would require customization and coding, so it wouldn’t be my first suggestion. But if you get desperate let me know and I can probably help you.

With PrintNode, I have taken my laptop to different places around the world and consistently gotten sub 1 second print times when doing label printing. The setup for document printing is a little different, but not by much.

Acumatica should work on releasing a 64 bit DeviceHub client. That would be a good start to laying a more reliable foundation for it.

 

 

 

 

Thank you @rosenjon, but this is not the solution that will best accommodate my client. I don’t have issues with timing and printing labels. The issue is DH not reconnecting after 30 secs the website goes down.

 

Userlevel 6
Badge +5

Hi @willie98 -

Yes, like I said probably not the preferred choice out of the gate. You could also take a look at the SignalR option with newer versions of Acumatica and DeviceHub..it’s possible receiving a SignalR message could “wake up” DeviceHub. SignalR messages happen on demand, so you don’t have to worry about polling intervals at all.

PrintNode can be used to print PDFs to laser printers or whatever other document you want to print...it is basically doing the same thing that DeviceHub does, but it’s cloud based and less flaky.  I use it for label printing, but it’s just as useful for printing documents to regular printers. Certainly try to fix DeviceHub, but if you can’t, then it would be a viable alternative in a pinch.

 

Thanks,

 

Jonathan

Badge +1

@willie98 we had the same issue. We had to add it to the client’s list of things to check after any customization publish.

Would be worth a ticket to Acumatica to see if is possible for DH connection to retry connection after publishes.

@Ahmed - oh yes, after update, upgrade, publishing, etc. we always go and reset them both. The problem is when it happens unexpectedly because of what I described, IIS Recycling

Userlevel 4
Badge +1

I documented something similar with the short window Device Hub sends for - seems I was all alone here 

 

I don’t know that the two are related, but agree that it’s incredibly frustrating to have an application on the server loose it’s connection and not be able to reset from the application or schedule it to reset/reconnect automatically after failed attempts.

I wish there was more attention given to DeviceHub and better documentation with regular updates and release notes

Hello everyone and @kyle90, @Ahmed

I was made aware that Acumatica 2021 R1 Update 122 (build 21.122.0021) has this fix:

AC-232162: After an inactive period of the DeviceHub application, which was longer than the timeout period of a session, DeviceHub did not process documents in the buffer according to the Create print tasks every x seconds setting in the Configuration window of DeviceHub. As a result, print jobs remained in the Pending status.

Which I believe it’s different from what I posted but they are not willing to continue with case until I have my client move to this build and try. My client’s Acumatica is heavily customized and moving to newer builds is not as easy and it’s time consuming. 


Is anyone going thru the same issue I posted above that is currently running Acumatica 2021 R1, Build 122.0021 or higher?

***UPDATE***
I did change the Recycling IIS time to a scheduled time- 3:15am. We have an hour window while they change shifts and no one is using the system. The Recycling sends the restart, sure enough the URL connection with DH is ready within 30 secs since there is no load on Server or SQL. It works!


Pending to do- move my client’s Acumatica current version to a higher build to try the fix from Ref: AC-232162 (above)

Small DH Bug??- it reports that it has been disconnected and log has the line (yellow highlight), therefore it looks like as if it is, but it really is not. Next time they print it actually takes on the job and prints. 


I’ll keep updating, I am sure I am not the only one with this issue.

Userlevel 7
Badge

Hi @willie98 - were you ever able to find a solution? Thank you!

Hello @Chris Hackett 

Yes, because the IIS settings were changed, but nothing from DH developers.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved