R shiny keep dropping offline while running long process - r

I'm writing to seek help on the issues in R shiny in relation to the long running process. My codes involved running several simulations which takes about 1 min to run in R console. However, when i run it in the Shiny app, the app just keeps dropping offline at about 20 seconds of running. Does anybody know the reason for this problem and how to fix it?
It would be really helpful to get some insights and potential solutions on this. Thank you.
--- Further edit below: hope the information below would be useful to clarify the problem.
The error message is not a real error message: the app just simply drops offline and asks to reload the page. Here is the app that we developed:https://glasgowhehta.shinyapps.io/MetaInsight_continuous_Bayesian/
(Apologies, due to the nature of the issue we could not think how to give a simple example.)
If you click the ‘Data analysis’ tab - ‘3. Bayesian network meta-analysis’ tab - ‘3d. Nodesplit model’ tab, then click the button ‘Click here to run the main analysis for all studies’, it will drop the app offline before generating results (but this will take nowhere near as long as it would take for the server to disconnect due to user inactivity). The programme behind this button is a series of simulation evaluations using JAGS (which uses Gibbs Sampling and is computationally intensive and can produce a lot of data https://en.wikipedia.org/wiki/Just_another_Gibbs_sampler).
When only a small number of simulations are required, results could be rendered, however, when a larger number of simulations are required, the app will drop offline. You could test this by ticking some studies out from the sidebar, say ticking all the studies from ‘Kuo 2006’ down until ‘Derosa 2005’, which will result in only a small proportion of the data entering the ‘nodesplitting analysis with studies excluded’. After ticking these studies out, click the button on the right hand side, ‘Click here to run the nodesplitting analysis with studies excluded’, then the results should be rendered.
So our questions are:
1) Why does the app drop offline when the background computations are more extensive (i.e. is it a memory or a time issue or another altogether)?
2) What can be done to get round this problem (we have tinkered with the server settings but without success)?
We would be very grateful for any advice.

Related

Show 2 shiny apps one after another

I have 2 different shiny apps, and I would like to show them one after ther other (the first should be a survey and the second a memory game).
I tried to find a solution, but I never found exacly what I am looking for. Maybe a third app that combines them?
The only thing I found is :
Switch between two shiny apps in one
But:
You have to click on which app do you want to start, and I want it to be automatically (so that the users won't play the game before the survey)
When I upload it to shinyapps it raises an error
Thanks!

Why is there a CLS problem with real user data but not with the lab data?

when I test the page in DevTools, there is no problem with CLS.
But, with pagespeed-insights there appears a difficulty with the mobile page CLS.
Not for the lab data, but only for the real data:
https://federhilfe.de/rotkehlchen-anlocken-im-garten-ansiedeln-fuetterung-nisthilfen/
https://pagespeed.web.dev/report?url=https%3A%2F%2Ffederhilfe.de%2Frotkehlchen-anlocken-im-garten-ansiedeln-fuetterung-nisthilfen%2F&hl=de
Do you have any idea how to solve this problem?
Thank you very much!
Alex
The guide at web.dev/lab-and-field-data-differences mentions a few reasons why CLS may be different across lab and field measurement:
CLS may depend on real-user interaction, while lab tests do not simulate any interactions (by default)
Personalized content from real users may affect CLS, which may not be represented in lab testing
Real users may have warm caches, so content may not need to load, minimizing CLS, whereas lab tests traditionally run with empty caches
To help identify why CLS is happening to real users, the first step I'd recommend is to use the website yourself with something like the Web Vitals extension enabled. Just from scrolling to the bottom of the page with the heads-up display (HUD) turned on, I can see CLS values gradually increasing and exceeding the "good" threshold of 0.1
I'd also recommend measuring Web Vitals in the field to ensure that you have additional debug data about what might be causing CLS to your real users.
Even though this kind of interaction-induced CLS wouldn't be reproduced by lab testing, it could still identify possible causes of real-user CLS. The PageSpeed Insights link you shared, you can click Show audits relevant to: CLS. For the desktop results, there are two audits that need attention:
Image elements do not have explicit width and height
Avoid large layout shifts

Power BI - Switch table structure depending on what is selected

I'm trying to understand the workflow and how to think when working with Power BI.
I'm trying to create the visual side of a logging framework using azure application insights and log analytics in the background.
What I got stuck on right now is using a visualization for different table structures.
Scenario:
So lets say I have an integration workflow that is compiled of different components (starts at one endpoint, being processed and sent to destination endpoint), and this workflow is used in parallel depending on the endpoints.
Visualization:
A ----> (integration process) -----> B
C ----> (integration process) -----> D
A <---- (integration process) <----- B
C <---- (integration process) <----- D
In this process I'm logging traces and exceptions for each workflow for example.
And lets say I have extracted the power BI query from log analytics to import the data into Power BI.
Now as you can see above I have an "Send" and "Receive" flow for both sets of endpoints per parallel integration so to speak and I want to be able to pair these per report in Power BI.
Problem:
So then to my problem for now;
Let's say I want to put a doughnut chart with total amount sent AND received messages.
Also when clicking on the different parts of the chart I want to change the containing data and also the structure of the single table in the same report.
What I'm struggling with is using a table to display the content of two workflows that are related to each other in the sense of being a "Sent and received" visualization of the integration, but don't have any hard drawn relations to each other in code.
I was reading something about a switch statement but I thought i'd ask the question here to learn "the way of thinking" when using Power BI.
Hope I made my problem clear by the description above, if I forgot anything please ask and I'll do my best to try to further explain what I'm asking for.
EDIT:
Ok so regarding the feedback i got of the question being to broad, does it help i i would say i want to be able to switch everything in a Table (that is: all columns and values), by a clickable slicer for example.
why i'm trying to achieve is something similar to this, but for a table view:
Youtube Link:
Using SWITCH True Logic In Power BI - DAX Concepts
Do i select the content of a table with a measure-query or do i have to do any other special fix to get this to work?
Hope this clarify the problem i'm working on.
If you are looking to switch between two entirely different tables, I'd recommend using buttons to toggle between different bookmarks which show/hide different visuals.
Check out the documentation for bookmarks and buttons for more detailed information and come back if you get stuck and have more specific questions.

Classic asp code using more resources

I am using classic asp for a web application. I am running the web application on internet explorer.
I had developed few reports related to sales data. All the sales report are linked to Sales Dashboard. Every report has some selection criteria like customer selection date period selection product group selection and other few.
Now the problem which I am facing.
I open a total sales report for the entire year which takes almost 15 minutes to load on screen. while the report is executing if I try to open any other from the sales dashboard the page with selection criteria will appear after the first report is completely executed. If I copy the link location for the second report and open it in new window of internet explorer it will open normally.
I am not able to trace the problem did anyone had face the same problem.
First, I agree with this comment posted under the question:
IIS/ASP only allows one concurrent request per session. This is why the second request does not happen until after the first one completes. If you open a new browser instance or a different browser then this is treated as a different session.
Second, if all that is being asked here is whether other people have similar issues or not, then the answer is yes, due to what johna said in the comment.
If you're looking for a way to get around that for yourself, the way described in the comment (open a new browser instance or a different browser) will work.
However, if you're after a way to bypass the 15 minute wait time entirely, give some though to preparing the data before the report is called. What I mean by that is either schedule the report to run after close of business each day and store the relevant HTML or data separately, and/or provide a button to prepare the report based on current data which can be run whenever the user wants.

DirectShow Run graph

This is no longer necessary to keep in forum for lack of poor format nor statistical data keeping.
When the graph says it's running it doesn't really mean any activity is taking place, it just means the graph object told the filters to run and set its "state" variable to "running". However if any filter is stuck for any reason and doesn't send or receive the data everything freezes but the graph state remains "running". Some editors like GraphEditPlus can show states of each particular filter in the graph, so if some of them report to be stopped or paused while some others are still "running" you will see this. In most cases however you'll just see all filters "running" and won't know which of them is stuck unless you insert sample grabbers between them and tell GraphEditPlus to show grabbed samples in real time, this is a good way to understand what's really going on.

Resources