Failed to connect to viktor after lots of local API calls

We are making an app that does a lot of API calls to a local server. I then mean tens to even a few thousand in some cases (I know it is not very efficient but that is just how the api works for now). When in my development environment, I noticed that after doing tens of API calls, Viktor cannot connect to the Viktor platform anymore. I then get the message below several times.

2024-06-04 09:49:10.802 WARNING : Connection is closed
2024-06-04 09:49:10.803 INFO    : Could not connect, retrying in 1 seconds
2024-06-04 09:49:11.804 INFO    : Connecting to platform...
2024-06-04 09:49:11.986 INFO    : Connection is established: https://tauw.viktor.ai
2024-06-04 09:49:11.987 INFO    : The connection can be closed using Ctrl+C
2024-06-04 09:49:14.423 INFO    : App is ready

Though it says the app is ready, I cannot use it anymore. Sometimes a restart of VS code is sufficient but more often, I have to completely remove an entity.

Basically what the app does is the following:

  1. Use the python request package to make a GET and POST request
  2. Process the results
  3. Store things to a hidden field
  4. Update the dropdown list of a dropdown field.

Does somebody know what is going wrong all the time?

Software information:

  • Python: 3.10 via Venv’s
  • Viktor CLI: v0.35.0
  • Viktor SDK: 14.6.1

The problem seemed to be hidden fields. I loaded quite some data in a hidden field. I rewrote it to use storage and then the app seems to work fine.

It is still guessing why it didn’t work because it was just json data.