asyrjasalo / RESTinstance

Robot Framework library for RESTful JSON APIs
https://asyrjasalo.github.io/RESTinstance
GNU Lesser General Public License v3.0
204 stars 84 forks source link

Could memory usage of RESTInstance library be increasing with too many API calls? #117

Closed TeddyTeddy closed 2 years ago

TeddyTeddy commented 3 years ago

I use a locally running JSON REST API server, which has a lightweight db.json database file containing the resources (i.e. posts, comments, albums, photos, users, todos). Using RESTInstance I created Test Cases testing /posts endpoint with CRUD calls.

The problem is that the RAM & Swap memory Robot FW process using hits Gigabyte levels for some long running tests. This causes my Linux to freeze, so i am unable to run those long running tests.

The high memory usage problem can be in Robot, in RESTInstance Module, in my code or a combination of those. Here is a stackoverflow ticket to reproduce the issue.

Given too many API calls, can you verify that RESTInstance library does not consume memory increasingly?

asimell commented 2 years ago

Hi,

and sorry for the delay. I haven't had any issues with memory usage with RESTinstance. Based on the comments in the SO ticket you linked, it seems like the issue could be with your nested for-loops.

Also, there was a new release of Robot Framework not too long ago fixing a memory usage issue. Could you try with the latest RF version (4.1.2) and see if you're still running out of memory?

asimell commented 2 years ago

Closing due to lack of knowledge. Please reopen if still relevant.