Trying to run a staging on 7.9.12 (I know, I know, we have our other server currently going through 8.1.25 sandbox testing).
On Windows server 2019.
I am trying to launch a staging client to test some edits, both on the server and my local development (non-gateway) PC, I am getting the per title error message when the staging client attempts to start.
Maximum Java Heap Size (in MB)
I would infer that there is enough heap space available, and a normal (published) client starts fine, any known bugs with staging? As you can see we only rebooted 22 days ago, trying to avoid a reboot if possible.
Client heap != Gateway heap. Separate process, separate JVM, separate heap. If you can launch the designer, client heap is an option in the project properties. If you can't launch the designer, it's an option in the gateway settings.
Initial 1024 Max 4096 in Client/Launching already. 4096 is the max selectable in the dropdown.
Are you using the native client launcher? Is it using the embedded JRE, or the system runtime? It's possible, though unlikely, that you could be using a 32 bit runtime that can't dedicate sufficient heap, perhaps? Usually that just fails and disappears immediately rather than giving you a useful error message.
Is there any stacktrace on the error message? Maybe in the logs in the .ignition folder.
No expand option on error message.
Please advise where I can check this setting.
Logs via PM, tried to redact but some reason discord wasn't saving it...
Okay, so I'll answer publicly just in case this comes up for anyone in the future, but basically, looking at the last line of the logs there's something like this:
Starting Java with the following parameters
And then a long command line string with a bunch of arguments. For your client launch, it looks like this (with anything sensitive redacted):
C:\Users\Matrix\AppData\Roaming\Inductive Automation\Client Launcher\jre\bin\java.exe
So, you are using the client launcher's embedded JRE (notice the path to the java executable), and you are launching with 1gB/4gB as your preferred heap, which are both good things to confirm.
What you can do to capture the full logs from a client launch is to take the actual command line string from the logs and run it yourself, in a command prompt/windows terminal/powershell/etc window. It's probably also a good idea to pipe the output directly to a file, e.g. your actual command should be
$theCommand > output.txt and thus all output from the launched process to
stdout will be automatically logged to a new file
output.txt. Then hopefully you should be able to get a useful stacktrace. You can also try manually increasing the memory (if your system has more available!) to get the client to launch, just as a curiosity.
Thanks Paul, finished for the day so get a look tomorrow.
Note it's only the staging that's failing to start (I was doing from Designer F9), all I added was a new main window with a few check boxes. As its such a small change I'm just going to pubish tomorrow anyway and ensure the published doesn't have heap issues.
I'll have a further look at your other advice then too.
I can't remember for sure (it's been a long time since I've been in the 7.9 codebase) but I want to say that the 'launch' options in the designer might have ignored the actual client memory options and simply launched at some hardcoded value for min/max memory. Those launches wouldn't show up in the client launcher logs you sent me; they're a special process launched from inside the designer itself. I don't know for sure, but I vaguely remember someone fixing that behavior somewhere in the 8.x line.
Sorry but I don't think that's right, Paul.
Firstly, launching from designer is the only way of launching a staging session - at least on 7.9.12, from the manual;
At this point, we have saved but unpublished resources. If you would like to see and test these changes before publishing them, you can open a staged Client from the Designer. Go to the menubar and select Tools > Launch Project > Windowed (Staging) . This will give you a Client with a blue banner at the top showing that you are running a Staging Client instead of a normal Client.
Secondly, I didn't launch a "standard published" client on my dev station yesterday, so those logs had to have been from the staging session.
Anywho, I went ahead and did my publish on the gateway. We don't have many more planned activities in the pipeline before we move production to 8.1.25.