Prerequisites
Expected Behavior
OpenPLC login pass and connection with runtime on raspberrypi is established
Current Behavior
Running OpenPLC runtime v4 on original raspberrypi - first generation.
Runtime is active but it is impossible to connect with device using OpenPLC editor. The response from raspberrypi on /login request is too slow and Login operation is considered as timedout in editor
Steps to Reproduce
-
I've been trying to run OpenPLC runtime v4 on first raspberrypi. Installed without issues when added raspbian here:
https://github.com/Autonomy-Logic/openplc-runtime/blob/91cfacd10af5738b771109de644842047e16cf92/install.sh#L157
-
When OpenPLC editor is trying to login it sends two requests to runtime REST API:
The first one - to check if user exists:
192.168.100.20 - - [11/Jan/2026 18:06:54] "GET /api/get-users-info HTTP/1.1" 200 -
{"id": 20, "timestamp": "2026-01-11T18:06:59.196580+00:00", "level": "DEBUG", "message": "User found: <User 1>"}
And the second one with login request:
192.168.100.20 - - [11/Jan/2026 18:07:06] "POST /api/login HTTP/1.1" 200 -
The successful response(200) is received after 7-10seconds but editor timeout for login is 5seconds:
|
private readonly RUNTIME_CONNECTION_TIMEOUT_MS = 5000 // 5 seconds (important-comment) |
- Editor prints error: Login Failed: Connection timeout
Possible Solution (Not obligatory)
The easiest solution may be to increase OpenPLC editor Login timeout to 10-15seconds
Context
I've been tracking what and why login procedure on first raspberry pi is so slow.
This function call: create_access_token(identity=user) is the reason:
https://github.com/Autonomy-Logic/openplc-runtime/blob/91cfacd10af5738b771109de644842047e16cf92/webserver/restapi.py#L250
Original raspberrypi is a weak hardware and has small entropy pool:
pi@raspberrypi:~/openplc-runtime $ cat /proc/sys/kernel/random/entropy_avail
256
This probably makes flask_jwt_extended.create_access_token very slow
Installing haveged doesn't helps
Your Environment
- App version : 4.1.1
- Branch : main
- Operating System and version : Ubuntu 25.10(PC with OpenPLC editor) Raspbian GNU/Linux 13 (trixie) (raspberrypi)
Prerequisites
Expected Behavior
OpenPLC login pass and connection with runtime on raspberrypi is established
Current Behavior
Running OpenPLC runtime v4 on original raspberrypi - first generation.
Runtime is active but it is impossible to connect with device using OpenPLC editor. The response from raspberrypi on /login request is too slow and Login operation is considered as timedout in editor
Steps to Reproduce
I've been trying to run OpenPLC runtime v4 on first raspberrypi. Installed without issues when added
raspbianhere:https://github.com/Autonomy-Logic/openplc-runtime/blob/91cfacd10af5738b771109de644842047e16cf92/install.sh#L157
When OpenPLC editor is trying to login it sends two requests to runtime REST API:
The successful response(200) is received after 7-10seconds but editor timeout for login is 5seconds:
openplc-editor/src/main/modules/ipc/main.ts
Line 75 in 9d7ea78
Possible Solution (Not obligatory)
The easiest solution may be to increase OpenPLC editor Login timeout to 10-15seconds
Context
I've been tracking what and why login procedure on first raspberry pi is so slow.
This function call:
create_access_token(identity=user)is the reason:https://github.com/Autonomy-Logic/openplc-runtime/blob/91cfacd10af5738b771109de644842047e16cf92/webserver/restapi.py#L250
Original raspberrypi is a weak hardware and has small entropy pool:
This probably makes
flask_jwt_extended.create_access_tokenvery slowInstalling
havegeddoesn't helpsYour Environment