Network error triggering the download report(report generation) action in server.R twice - r

I have the shiny application deployed on the Rshiny pro server. The main aim of the application is to process the input excel files and produce the report in the form of word document which has couple of tables and around 15 graphs rendered using the ggplot.
This application works perfect for the input excel files having less than approx. 3500-4500 rows for around 10 metrics.
Now, I am trying to process the excel file with around 4000-4500 rows for around 20 metrics. While processing this file, during report generation(Rmarkdown file processing) it's showing the network error on the UI only. Despite this error on the UI, in the back-end the report file is getting generated, but the generated report doesn't get downloaded. After this error, the report generation action is getting triggered automatically resulting in the generation of two reports which is again doesn't get downloaded.
So, from this observations, I came to the conclusion that on getting the network error, the download report(report generation and downloading) action is getting triggered again by the server.R.
Has anyone been through such strange situation? I am looking for guidance regarding the two problems here-
What can be the reason of getting the network error sometime only?
What is there, which is triggering the download report action twice?
Is there any option to specify the max. session timeout period?

I have found answers to above questions and I have already answered it here.
Though I would like to quickly answer questions in above explained context.
Reason for getting network error: User will be presented with the network error only if the computations(in this case report generation) doesn't get completed within the 45 seconds. This is because the http_keepalive_timeout parameter is not defined in the server configuration and the default value for http_keepalive_timeout parameter is 45 seconds.
Why download report action was getting triggered twice? : It is because the user session with the server was getting terminated during the computations which were happening after clicking the Download action button
. There is parameter called reconnect in the shiny server configuration which is enabled by default. When a user's connection to the server is interrupted, Shiny Server will offer them a dialog that allows them to reconnect to their existing Shiny session for 15 seconds. This implies that the server will keep the Shiny session active on the server for an extra 15 seconds after a user disconnects in case they reconnect. After the 15 seconds, the user's session will be reaped and they will be notified and offered an opportunity to refresh the page. If this setting is true, the server will immediately reap the session of any user who is disconnected.
You can read about it in the shiny server documentation.
Option to specify the max. session timeout period: Yes. There is a parameter called http_keepalive_timeout. It will allow you to specify the maximum session timeout period. You will need to add http_keepalive_timeout parameter to the shiny-server.conf at the top level with the timeout period you want in seconds as shown below.
http_keepalive_timeout 120;
Read more about http_keepalive_timeout here.

Related

500 Internal Server Error While Reports in Acumatica

The cash summary by branch report is customized report and we can run earlier and the issue is currently happened.
Faced that the issue that is the 500 Internal Server Error when we run the report.
But We have no this server error when run for each month period (Eg- From Date to(11/1/2022), To Date(11/16/2022)) and can't run by year(Eg- From Date(1/1/2018), To Date(11/16/20220). Why is this the case and how to solve it?
enter image description here
enter image description here
enter image description here
We have no this server error when run for each month period (Eg- From Date to(11/1/2022), To Date(11/16/2022)) and can't run by year(Eg- From Date(1/1/2018), To Date(11/16/20220).
Please help to check and let me know any concern
When building the new report, I would set a default values that work, and then be able to use the Preview function. It will execute the report using the default values only during preview.
You can then use that to troubleshoot - start with the base report that works with that range that crashes on the custom report, and then slowly add your changes. You would then find out what change causes the 500 internal server error.
If you have access to the server, you can try using failed request tracing to get additional information on the errors that are not being sent to the web client. Here is a link on how to troubleshoot failed requests: https://learn.microsoft.com/en-us/iis/troubleshoot/using-failed-request-tracing/troubleshooting-failed-requests-using-tracing-in-iis?source=recommendations

shiny downloadHandler timeout

I have produced a shiny application that requires a download that takes longer than the time that download handler allows. I keep getting an error that says "NO DATA RECIEVED" before the data that I am downloading has completed.
Is there any way to increase the length of the timeout of downloadHandler in Shiny Server Applications?
The default timeout for the connection is 45 s. This can be increased by setting the http_keepalive_timeout in the shiny server configuration file. Have a look here:
https://github.com/rstudio/shiny-server/blob/master/config/shiny-server-rules.config

SSRS Report Viewer 10.0.0.0 Error

From my application, the user clicks a button that launches a new window that contains the Report Viewer control and from there the user chooses the parameters from dynamically generated dropdown lists. When they click the View Report button it will occasionally throw the following error:
"The report execution {random ID code that changed with each error} has expired or cannot be found. (rsExecutionNotFound)"
After doing some Google research, I've tried:
Trimming all white space from the report path.
Extending the session time out on the server.
Making sure the time zones were the same on both the SSRS server and the SQL server.
Remove the session variable that equals "Microsoft.Reporting.WebForms.ReportHierarchy".
None of these solutions have fixed the problem. I have not been able to figure out what causes the error to show up. It seems to get thrown at random times.
Has anyone run into this error and figured out what causes it/how to fix it?
Thanks
You should look into the log file on the reporting server to obtain more detailed info. The log file is created in [PROGRAM_FILES]\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\LogFiles. If you can isolate the conditions and reproduce the problem then you can more than likely find more info on what is causing the issue. I would bet this is an issue when a report is requested and your application's session has not expired but the session between you app, the reportviewer, and ssrs has expired. You can increase that value.

Long query: Does anyone know what this error is all about?

Currently, I am doing a query to a sql server database which has 6 million records.
A date range is specified in the query in order to filter the result. When the date range is short, i.e. 2 hours, the application displays the result with no problems.
But if the date range is a bit longer, i.e. a week, the application displays the following errors:
Finally, after I have accepted the two previous errors, and I click in any other section of the application I get the following error:
Strangely, this behaviour only happens in the live server (running on iis7), whereas in the localhost (casini) the applications displays the query results regardless the data range value.
Any thoughts on how to get around the problem will be greatly appreciated.
For your first problem, read following article here
When an error occurs on the server while the request is being processed, an error response is returned to the browser and a PageRequestManagerServerErrorExceptionobject is created by using the Error.create function. To customize error handling and to display more information about the server error, handle the AsyncPostBackError event and use the AsyncPostBackErrorMessage and AllowCustomErrorsRedirect properties. For an example of how to provide custom error handling during partial-page updates, see Customizing Error Handling for ASP.NET UpdatePanel Controls.
For second problem, may be you can get solution here
Solution: Our web server could not resolve the URL of the back-end website. We needed to add a hosts file entry on our server to resolve the issue.

Error when running TcmReindex.exe

I am currently trying to get search working in my Tridion 2011 installation. I read in another article that I should run the TcmReIndex.exe tool in the Tridion/bin folder to re-index all my sites. So I tried this and it failed with a message box giving the following details
Unable to get list of Publication items.
Unable to Intialize TDSE object.
The wait operation timed out
Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=21054; handshake=35;
The wait operation timed out
A database error occurred while executing Stored Procedure "EDA_TRUSTEES_GETTRUSTEEETOKEN"
I have four fairly large publications (100 000+ items in total) which I am trying to index.
Any ideas?
Whenever I get "Unable to Intialize TDSE object." errors, I typically write a small test script using VBScript, and try running it on the CMS server. Whilst this does not directly solve the problem, it often gives some insight into the issue by logging information in the event viewer. Try creating a test.vbs file as follows and running it:
Set tdse = CreateObject("TDS.TDSE")
tdse.initialize()
msgbox(tdse.User.Description)
Set tdse = Nothing
If it throws any errors, please let me know, and it may help us solve the problem. If it gives you a popup with your user description, then I am completely barking up the wrong tree.
I haven't come to anything conclusive but it seems like my issue may have been a temporary one as it just started working. I did increase all timeouts in Tridion MMC > Timeout Settings by 100 times their amounts but I suspect that this wasn't the issue, when it works the connection is almost instant.
If anyone else has this issue
Restart the computer the content manager is installed on, try again.
Wait an hour or two, try again.
Increase timeouts, try again.
I've run the process a few more times and it seems to be working correctly.

Resources