Openshift proxy timeout - proxy

I have an application hosted with Openshift and I need it to generate some Excel reports. The report generation process can take a long time (over 5 minutes). This causes the the client to see a 502 error and the request times out. How can and where can I configure my Openshift stack (it is a Java webapp running from Tomcat6) to increase the timeout duration?

5 minutes is an awfully long time for a web request to run. It would be better to have the web request schedule a background job that then notifies the user when the report is done being generated.

Related

ASP.NET Core 6 Web API: long waiting before WCF calls

I have an ASP.NET Core 6 Web API which will call WCF on the same server, but different site hosting on IIS.
I now have an issue that when I call WCF (I have tested WCF using SoapUI with same settings too, the result is normal and don't have this issue), I found a long waiting before the call to the WCF service. I have traced the current connections counter in performance monitor and found it like the image below:
I use SoapUI Load Test for testing this, with 50 threads settings at once and runs 2 per thread in SoapUI, and I get this chart for the current connections counter. And the chart is the same as the SoapUI percentage, in the long waiting the percentage keeps 0% and in the peaks the percentage goes up. The response time of the load test leads to nearly 30 seconds due to this long waiting.

Heroku Webhook Fails Sometimes

I'm creating a chatbot with dialogflow and I have a webhook hosted on heroku (so that I can use python scripts). The webhook works fine most of the time. However when I haven't used it in a while it will always fail on the first use with a request timeout. Has anyone else come across this issue? Is there a way to wake up the webserver before running the script I have written?
Heroku's free dynos will sleep after 30 minutes of inactivity.
Preventing them from sleeping is easy. You need to use any of their paid plans.
See https://www.heroku.com/pricing
Once you use a Hobby dyno, your app will never sleep anymore and you shouldn't be getting request timeouts.
Alternatively, you can also benchmark what's taking a long time to boot your app. With a faster boot time, the first request would be slow but wouldn't get a timeout.
Heroku times out requests after 30 seconds.

how to interpret Jmeter thread configuration

I am trying to stress test a web application which is composed of login,view page,other pages and log out. The full flow contains 14 request and I have created 300 users to complete the flow.
I have the following Thread Group configuration:
According to the online resources since I have 300 users and the ramp up period is 6, for each 1 second there will be 50 thread added. Therefore all the 300 thread will be up and running after 6 second.
So can I conclude that after 6 second Jmeter will have 300 active thread accessing the website at the same time?
My second question is when I execute the load test of more than 100 users when I view the Result Tree Listener in the Sampler Result tab the following error is triggered only for js and css files but when I open the response data tab for that request it is displayed correctly.
Response code: 200
Response message: Embedded resource download
javax.net.ssl.SSLHandshakeException message:Non HTTP response message: Remote host closed connection during handshake,
Is it a performance issue of my website or Jmeter cannot download all the js/css files?
Thanks in advance
With regards to your Threads configuration, the actual concurrency will depend on your application response time. JMeter acts as follows:
Each 1 second JMeter will start 50 users
Each of 50 users will start executing your 14 requests upside down
When a user will finish executing all requests it will be shut down
So given your application average response time for all 14 requests is > 500 ms you should have 300 concurrent users. You can always check how many users were online using Active Threads Over Time listener. See JMeter Test Results: Why the Actual Users Number is Lower than Expected article for more detailed information on the topic
Too little information to provide the answer check jmeter.log and your application under test logs for any clues. One thing is obvious: you should definitely NOT be running JMeter in GUI mode especially with View Results Tree listener enabled as it is too resource intensive and side effects might be unpredictable. So repeat your test in non-GUI mode with all listeners disabled and if the issue will remain - inspect log files.

Avoid timeout on long running process of report generation

I have a webapp developed using Spring MVC. I am using jasperReports to generate a series of reports for the user to download. In several of these reports, filling them by jasper takes too long and this causes either a transaction timeout, a Tomcat Timeout or a gateway timeout on the client side.
What's a good solution for long-running processes like this? Note that it should somehow inform the user whenever the process is finished so he can download the file.
The cleanest way to handle such issue is to have an asyncronous communication with your client.
The first request /myApp/report?name=...&paramters... triggers jasper report to refresh the report and returns a ticket id
Then, the client have to call another url to retrieve the report (for instance every 5 seconds) /myApp/reportDownload?ticketId=xxxxx
If the jasper thread is over and the report ready, you send back the report, otherwise tell the client to retry in 5 seconds until it gets the report.
The way to implement it depends on the technlogies you are using in for the front and backends, but you'll find dozen of tutorials on the internet.
The worst way to fix it is to increase the timeout in the connector configuration (http://tomcat.apache.org/tomcat-7.0-doc/config/http.html)
HIH

ASP.Net Web Api initial requests are taking too long

Initial requests are taking 3-5 seconds, subsequent calls takes < 500 milliseconds. Service makes a light weight stored proc call and there is no latency found when we profile it.
This service does not hit very frequently and Idle Time-out of the Process model is 20 minutes (default). We tried to hit it every 19 minutes but no change.
Service running under IIS 7.5 with .Net framework 4.5
The first request for an ASP.NET website always takes some time because the code needs to be compiled. You can install a module for IIS that automatically makes that initial request so you don't get that slowdown yourself.
http://www.iis.net/downloads/microsoft/application-initialization

Resources