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:
- Use the python request package to make a GET and POST request
- Process the results
- Store things to a hidden field
- 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