A Docker-hosted .NET 8 Blazor WebAssembly image on a PLCnext 2152 starts, runs for several seconds, and then reports a memory fault. However, htop suggests thread pressure rather than confirmed memory exhaustion. Treat those as separate hypotheses until diagnostics identify the exhausted resource.
Separate the memory and thread hypotheses
| Observation | What it establishes | What remains unknown |
|---|---|---|
| The image runs for a few seconds before faulting | Startup succeeds at least temporarily | The component and resource causing termination |
| A memory fault is reported | A memory-related diagnostic exists | Whether physical memory, a process limit, or another condition caused it |
htop appears to show thread saturation |
Thread usage warrants investigation | Whether the system thread ceiling was reached |
Do not conclude that the PLC needs more threads from the htop view alone. Record the complete fault text and identify whether the container exits, restarts, or remains running while the application fails.
Check the system thread ceiling
Inspect /proc/sys/kernel/threads-max and compare that system limit with the observed thread count at failure. The available evidence does not establish that this ceiling is being reached, nor does it identify a supported method for increasing thread allocation on this controller.
- Start the same Blazor image and record its behavior from launch through failure.
- Monitor memory and thread counts with
htop. - Read
/proc/sys/kernel/threads-maxwithout changing it. - Capture the diagnostics associated with the reported memory fault.
- Determine whether thread count reaches a limit or memory usage reaches an observable constraint before changing resource settings.
Integrate the Blazor route with nginx
The nginx configuration on a PLCnext Control device can be modified as on another nginx platform, so a location can be added for the Blazor application. The evidence does not provide the active configuration path, route name, document root, or proxy target; derive those from the installed configuration instead of guessing them.
Preserve the existing WBM routes while adding the Blazor route intended to replace the eHMI pages. Back up the active configuration, check for route overlap, validate the edited nginx configuration, reload it, and verify both the Blazor application and WBM endpoints. This routing change is independent of the runtime fault and should not be treated as its remedy.
Firmware and diagnostic boundaries
The controller is described only as a PLCnext 2152 running the latest firmware; no exact firmware version is supplied. Record the installed firmware identifier with the failure evidence so the behavior can be reproduced and assessed against that specific build.
FAQ
Can I add my .NET 8 Blazor app to the PLCnext nginx configuration?
Yes. Add a location for the application while preserving the existing WBM routes, then validate and reload nginx before testing both endpoints.
Does a PLCnext Blazor memory fault mean the controller is out of memory?
Not from the available evidence. Capture the full diagnostics and correlate memory and thread counts at the moment of failure before identifying the exhausted resource.
How do I determine whether the PLCnext controller is thread-bound?
Monitor the thread count with htop, inspect /proc/sys/kernel/threads-max, and compare the observed count with that ceiling. Do not change the limit unless diagnostics show that it is actually reached and the change is supported for the installed firmware.