Dear Teltonika Support,
we have observed what appears to be a memory leak in the RutOS session process on a RUTM52 router when the REST API is queried periodically. As we use the router with tailscale vpn this leads after two days in completely unresponsive admin ui and connection being dropped to tailscale as the system seems to hard stop the tailscale service.
Test Environment
A Python-based Docker service polls the router every 10 seconds to retrieve the current WAN status.
The communication sequence is as follows:
- Authenticate via:
POST /api/login
-
Store the returned Bearer token.
-
Periodically query:
GET /api/ip_routes/ipv4/status
The application uses a single persistent requests.Session() object. A new HTTP session is not created for every request.
The Bearer token is cached for 240 seconds and reused for all API requests during that period. A new login is only performed after the token expires or when the router returns HTTP 401/403. Therefore, the router is not being authenticated every 10 seconds.
Observed Behavior
While the Docker service is running, the memory usage of the RutOS session process continuously increases.
Measured values:
Tue Jul 28 07:34:03 UTC 2026
VmRSS: 1060 kB
RssAnon: 208 kB
Tue Jul 28 07:39:03 UTC 2026
VmRSS: 1108 kB
RssAnon: 256 kB
Tue Jul 28 07:44:03 UTC 2026
VmRSS: 1160 kB
RssAnon: 308 kB
Tue Jul 28 07:49:03 UTC 2026
VmRSS: 1208 kB
RssAnon: 356 kB
Tue Jul 28 07:54:03 UTC 2026
VmRSS: 1292 kB
RssAnon: 440 kB
Tue Jul 28 07:59:04 UTC 2026
VmRSS: 1340 kB
RssAnon: 488 kB
Tue Jul 28 08:04:04 UTC 2026
VmRSS: 1400 kB
RssAnon: 548 kB
Tue Jul 28 08:09:04 UTC 2026
VmRSS: 1440 kB
RssAnon: 588 kB
Tue Jul 28 08:14:04 UTC 2026
VmRSS: 1528 kB
RssAnon: 676 kB
Tue Jul 28 08:19:04 UTC 2026
VmRSS: 1588 kB
RssAnon: 736 kB
Within only 45 minutes, RssAnon increased from 208 kB to 736 kB, corresponding to approximately:
-
528 kB in 45 minutes
-
~700 kB per hour
-
~16–17 MB per day
During the entire observation period, memory usage increased continuously and never stabilized or decreased.
Verification Test
To verify the source of the problem, we completely stopped the Docker service.
After stopping the service, the memory usage of the RutOS session process remained completely stable for more than 60 minutes. No further increase was observed.
This strongly indicates that the repeated REST API requests trigger the increasing memory consumption inside the router’s session process.
Our Current Assessment
From our perspective, one of the following may be happening:
-
API sessions or Bearer tokens are not completely released after re-authentication.
-
The endpoint
/api/ip_routes/ipv4/statusallocates memory that is not released. -
Internal resources associated with authenticated REST API requests are not cleaned up correctly.
Since the increasing memory usage is observed inside the router’s own session process, and not in the external Python application, we believe this may be a memory leak within RutOS itself.
Questions
-
Is this behavior already known for the RUTM52 or the current RutOS version?
-
Are there any known memory leaks related to the session process or the REST API?
-
Are expired Bearer tokens automatically cleaned up by RutOS?
-
Is there a recommended lifetime or reuse strategy for REST API tokens?
-
Are there any known issues with frequent requests to
/api/ip_routes/ipv4/status? -
Is this issue fixed in a newer RutOS release, or is there a recommended workaround?
Device Information
-
Device: Teltonika RUTM52
-
RutOS Version: RUTM_R_00.07.23.8
-
API polling interval: 10 seconds
-
Bearer token lifetime in our application: 240 seconds