Hello!
I have the TSPlus version of 25 licenses, but when 20 HTML5 clients connect at the same time,
apparently the server gets "overloaded" and the HTTP servers stop working, knocking down all users.
How can I resolve this?
HTTP servers stop working
Re: HTTP servers stop working
Hello,
1. firstly go sure your Tsplus installation is up to date, install latest update if not.
2. install Java8 64bit
https://java.com/en/download/manual.jsp
Windows Offline (64-bit)
filesize: 62.34 MB
3. after reboot server
4. finally open the link in browser http://localhost/w0j41
In case if everything is looking good you should see something like
----------------------------------------------------------------------------------------
HTML5 version: v5.35 >>> Java: 1.8.0_131 (VM amd64) on Windows Server 2008 R2
AllocatedMemory: 16mb
PresumableFreeMemory: 8175mb
TotalMemory: 8191mb
You run Java 64bit on Windows64 system - everything looks good!
----------------------------------------------------------------------------------------
Notice per client you need between 30-100mb depending on load, in worst case scenario you would need also 2000mb of "PresumableFreeMemory"
PS: to make that link http://localhost/w0j41 displaying necessary info you need at least version from this year.
1. firstly go sure your Tsplus installation is up to date, install latest update if not.
2. install Java8 64bit
https://java.com/en/download/manual.jsp
Windows Offline (64-bit)
filesize: 62.34 MB
3. after reboot server
4. finally open the link in browser http://localhost/w0j41
In case if everything is looking good you should see something like
----------------------------------------------------------------------------------------
HTML5 version: v5.35 >>> Java: 1.8.0_131 (VM amd64) on Windows Server 2008 R2
AllocatedMemory: 16mb
PresumableFreeMemory: 8175mb
TotalMemory: 8191mb
You run Java 64bit on Windows64 system - everything looks good!
----------------------------------------------------------------------------------------
Notice per client you need between 30-100mb depending on load, in worst case scenario you would need also 2000mb of "PresumableFreeMemory"
PS: to make that link http://localhost/w0j41 displaying necessary info you need at least version from this year.
TSplus HTML5 and Java web engineer
-
- Posts: 15
- Joined: Thu Jul 27, 2017 7:42 pm
Re: HTTP servers stop working
The 64-bit java installation solved the problem.
Thank you so much!
Thank you so much!
Re: HTTP servers stop working
Hi guys.
Sorry to jump in.
Out of curiosity, I accessed http://localhost/w0j41 on one of our servers to check, and Java 64bit was fine and it looked good.
But then I noticed the PresumableFreeMemory and the TotalMemory showing numbers way bellow which the machine was reporting as available through TaskManager.
What do these numbers mean in this context?
Thanks.
Ivan
Sorry to jump in.
Out of curiosity, I accessed http://localhost/w0j41 on one of our servers to check, and Java 64bit was fine and it looked good.

But then I noticed the PresumableFreeMemory and the TotalMemory showing numbers way bellow which the machine was reporting as available through TaskManager.
What do these numbers mean in this context?
Thanks.
Ivan
Re: HTTP servers stop working
Hello,IvanGB wrote: the PresumableFreeMemory and the TotalMemory showing numbers way bellow which the machine was reporting as available through TaskManager.
that is the way how Java machine works, when starting Java checks how much free physical memory(not simulated on hard drive) is available at time of start, then it divides it by 4, also 25% and tells to the system to reserve this amount of memory, but reseving does not mean taking it completely, but just means Windows should try its best to deliver it when requested from physical memory.
Therefore the amount you see is just smaller part of approximatelly 25%. However when reaching this limit Java will fail too.
There is easy way to tell to Java to reserve 50% of memory by default instead 25% with -XX:+AggressiveHeap
If you are interested, let's assume GUI calls the batch file **Tsplus_program_folder***\Clients\webserver\runwebserver.bat
it has following content
------------------------------
*****HTML5service.exe" -Djdk.tls.ephemeralDHKeySize=matched *****the_rest****
---------------------------
now change it as on following example
*****HTML5service.exe" -XX:+AggressiveHeap -Djdk.tls.ephemeralDHKeySize=matched ********etc.**********
after saving open properties of runwebserver.bat file and set by Attributes > Read-Only else this file will be overwritten each time you restart server.
Now restart html5 server in GUI to make this change effective, that will double the amount of available memory to Java machine.
If you use -XX:+UseG1GC then you must disable -XX:-UseParallelGC, so that means, if -XX:+UseG1GC is present in your batch starting line then it will conflict since AggressiveHeap activates UseParallelGC which must be now disabled
*****HTML5service.exe" -XX:+AggressiveHeap -XX:-UseParallelGC -Djdk.tls.ephemeralDHKeySize=matched ***etc.***-XX:+UseG1GC***etc.*****
The problem by you before with Java32 bit on Windows64bit, Java sees there usually only ~1 Gb of free memory and divides it by four = ~250mb total which is to small for 25 parallely running clients.
TSplus HTML5 and Java web engineer
Re: HTTP servers stop working
Thanks for the explanation!