Some problems with stability – JS Application Server
This article is a quick overview of doing load testing of a web
application. < http://work.stevegrossi.com/2015/02/07/load-testing-rails-apps-with-apache-bench-siege-and-jmeter/>
It’s difficult to deal with issues without being able to replicate them.
Don’t be put off by the fact that it’s a Rails application because it makes
no difference what the server is running. While you’re running your tests,
have the performance monitor running as well to see what is going on with
CPU and RAM utilization.
If I must have Apache in the mix, I prefer to have it listen to requests
only on localhost and have nginx in front of it listening on port 80 or
443. Your URL namespace can dictate which requests get handled by Apache
and which are handled by nginx without having to proxy to Apache. E.g. your
static assets, like the CSS, JS, and images, can all be handled directly by
nginx if you use a /static location directive. Everything else can be
handled by Apache. You eliminate one potential bottleneck by doing that
because nginx deals with slow http clients much better than Apache because
nginx is event-driven. I recall a Django site where the server, which was
using Apache at the time we took over the project, was dropping requests
with only a few dozen simultaneous requests. Changing nothing other than
the web server to nginx, we were able to handle over 1000 concurrent
requests on the same hardware and the performance degradation was also more
predictable and linear. See this < https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-as-a-reverse-proxy-for-apache>
for how to configure nginx as a reverse proxy for Apache. This assumes PHP
but it is easy to adjust for other technologies.
You mentioned dynamically created JS files. How big are those files? Are
they cacheable on the client (the browser)? If they are, what, if any,
cache invalidation scheme do you have? In my experience, rich JS user
interfaces can make for some large files. If you don’t have any caching,
every single request is going to download potentially megabytes of stuff
that it had previously download but had been marked as not cacheable. The
user experience suffers and you’ll be wasting server resources. Making
those files cacheable will mean you will only have to transfer them once.
On subsequent requests, they’ll already be in the browser cache. However,
you must have some way of invalidating that cache to ensure that as you
deploy changes, you can force the browser to download the file(s) with the
changes. A common approach to doing this is to give the files some unique
name that is different than past names and either having a static build
process or dynamically injecting the new file name into the response.
On Thu, Feb 8, 2018 at 4:21 AM, Sten-Erik Björling
> Hi Mayada,
> I have earlier done the script modifications in the template, a bit
> uncertain about the use of the multiplier though. In the remote task I have
> in the construct assigned a 60 minutes limit for inactivity and in the
> destruct I have assigned 1 minute. These actions seems to have resolved the
> problem so far – will stress test to the best of my ability during the
> following days.
> One note though…
> It is important that the same changes are made to the jstempl in the Omnis
> application html-folder since that eventually is involved in the creation
> of the js-forms dynamically created by the server. I also cleared out the
> earlier dynamically created js-files for the subforms and then starting the
> Omnis app server.
> I am running macOS X Server with Apache and Postgres – do not think I can
> help in regard to the cron-jobs issue. Sorry… For those using macOS X
> Server it is a good idea to look into different parameters to increase
> performance of the server – Apple have really been setting the parameters
> Take care, all the best…
> > 7 feb. 2018 kl. 22:10 skrev Mayada Al-Kishtini
> > Stene,
> > Look in the achieve for a thread with this subject ” JS Client app &
> busy Omnis server”.
> > The recommendation there solved various issues for me:
> > In brief, I did these changes and things seemed to be running smoother
> for me (let’s keep our fingers crossed):
> > 1- added onbeforeunload=”jOmnis.onUnload()” to your html template:
> > So change this tag:
> > > “margin:0;overflow:auto”>
> > To read :
> > > *onbeforeunload=”jOmnis.onUnload()” *style=”margin:0;overflow:auto”>
> > 2- added a time out to my remote task to disconnect any idle connection
> after 30 mins..you can adjust that based on your need to avoid running out
> of licenses.
> > Not sure if any of above solutions will solve your issue, but just
> wanted to share my experience.
> > We use IIS and not Apache..But I don’t think that will make a difference.
> > More notes on this:
> > I’m running now into some other issues (where the server is running but
> user can’t connect), our OS server runs a number of cron jobs and handle
> web calls at the same time. I’m thinking that this is causing some issues
> with connecting to the web form when the server is busy with processing a
> job (which might be an http call to a third party API and might take a long
> time to get the response or when it process a long list).
> > So I’m investigating now the option of separating the jobs from the web
> calls. I started installing 2 servers at some sites, one to handle web
> calls only and the other one (with no web configuration) will be dedicated
> to process the jobs, so any issue there won’t affect the web traffic. Still
> testing this approach.
> > I also started installing a windows scheduled task on our sites to stop
> and re-start the Omnis serer once daily to make sure that the server is
> running until we manage to solve all its issues.
> > I’ll appreciate if you could share any further solutions that you might
> find that help in solving the connection to your web app.
> > HTH,
> > Mayada
> Sten-Erik Björling
> Enviro Data
> Kyrkogatan 5A 2 tr
> SE-972 32 Luleå
> E-Mail: firstname.lastname@example.org
> Mobile: +46-70-655 11 72
> Wire: @stenerikbjorling
> Skype: stenerikbjorling
> iChat: email@example.com
> FaceTime: firstname.lastname@example.org
> Hotmail / Messenger: email@example.com
> GMail: firstname.lastname@example.org
> This email and any files transmitted with it are confidential, may be
> legally privileged and are intended solely for the use of the individual or
> entity to whom they are addressed. If you are not the intended recipient,
> please note that any use, distribution, or reproduction of the contents of
> this email is strictly prohibited and may be unlawful. If you are not the
> intended recipient, please notify the sender by return email and destroy
> all copies of the original message including any attachments thereto. Thank
> Please note that we take reasonable precautions to prevent the
> transmission of viruses; however, we cannot guarantee that this email or
> its attachments are free from viruses. We only send and receive emails on
> the basis that we are not be liable for any loss or damage resulting from
> the opening of this message and/or attachments.
> Manage your list subscriptions at lists.omnis-dev.com
> Start a new message -> mailto:email@example.com
Manage your list subscriptions at lists.omnis-dev.com
Start a new message -> mailto:firstname.lastname@example.org