Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Loading statistics and deploying channels slow on service restart #6186

Closed
thorst opened this issue May 1, 2024 · 10 comments
Closed
Labels
bug Something isn't working

Comments

@thorst
Copy link

thorst commented May 1, 2024

Describe the bug
I have a python script that will clear the statistics, undeploy the channels and then restart the services. When it comes back up it will hang on the loading statistic screen for an unacceptable amount of time (more than 5 minutes) before it finally loads.

To Reproduce
I was told previously this was because of statistics, so I added the step to clear current and lifetime stats. I think the issue is that we have 300k pending transactions (the vendor was hacked, so we are just queueing). We use postgres so the database should be able to handle a lot of pending transaction (in my head anyway).

We have 305 channels deployed, they get deployed on system startup. Heap, ram, disk, everything looks perfect.

Running on redhat.

Expected behavior
I believe that logging in, deploying channels, and rendering stats should happen quicker, I'm not sure why it is taking so long. Only thing that I know we COULD be doing is that we set channel writers dependent on channel readers being deployed. We dont do that currently, but Ive started discussing it with the team that its something we probably should be doing.

Actual behavior
I think while its loading stats, it's still in the process of starting everything up, and the fact that we have a lot of high-volume channels, like ADT, it prolongs it even further. The channels I believe are deployed, but just not showing because gathering stats is expensive.

Mirth Version: 4.2.0
openjdk version "22-ea" 2024-03-19
OpenJDK Runtime Environment (Red_Hat-22.0.0.0.36-1) (build 22-ea+36)
OpenJDK 64-Bit Server VM (Red_Hat-22.0.0.0.36-1) (build 22-ea+36, mixed mode, sharing)
Red Hat Enterprise Linux release 8.9 (Ootpa)

@thorst thorst added the bug Something isn't working label May 1, 2024
@ab-mg-23
Copy link

ab-mg-23 commented May 2, 2024

I'll start with a question: What suggested a potentially 300+ thread software solution would have a fast startup/restart time? Threads aren't cheap.

@thorst
Copy link
Author

thorst commented May 2, 2024

I believe there is room for improvement possibly, but the primary issue was that we were having a disk array issue causing io errors and slowing everything down.

@thorst thorst closed this as completed May 2, 2024
@thorst
Copy link
Author

thorst commented May 2, 2024

I'll start with a question: What suggested a potentially 300+ thread software solution would have a fast startup/restart time? Threads aren't cheap.

Is there a "max" recommended number of interfaces per server? Our env runs with low cpu/ram, but perhaps we have too many interfaces on this server?

@pacmano1
Copy link
Collaborator

pacmano1 commented May 2, 2024

There isn't that I know because it wildly depends on what your channels do, message volume, back end config, etc. Before I wrote all code as multi-tenant, I have had engines with 1500 channels.

@thorst
Copy link
Author

thorst commented Jul 11, 2024

Part of the issue may be that our db is 6 tb

@kirbykn2
Copy link

kirbykn2 commented Jul 11, 2024 via email

@thorst
Copy link
Author

thorst commented Jul 11, 2024

I agree with this thought @kirbykn2 however the majority of our channels are set to prod mode, with 45 day retention. We would like to keep it at 45 or even more.i just put a ticket in for advanced message storage configuration. #6255 this will help reduce what is stored.

How do others implement long term storage? In that ticket I documented a couple thoughts on long term storage but I'm not sure what others are doing.

@kirbykn2
Copy link

kirbykn2 commented Jul 11, 2024 via email

@thorst
Copy link
Author

thorst commented Jul 11, 2024

For the s3 sync, is that a code template or post processor, or you send the raw message to a separate channel?

@kirbykn2
Copy link

kirbykn2 commented Jul 11, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants