We are facing a Tyk memory bug which is related to the import api functionality via a swagger file. You can find this button in the ‘Registered API Configurations’ screen. If we import a swagger file over and over again, the memory increases. Please see this diagram below.
You probably need a large swagger file in order to reproduce this issue on your side. I will send my swagger file in private message if you need it. Could you please try to reproduce this bug in your own tyk environment?
We are currently running the latest version of Tyk (1.3.9).
Do you mean that the memory usage of the gateway increases, or of the dashboard?
The gateway memory increases. If I restart the gateway instance, memory is of course released.
Thank you - we will try to reprouce the issue and get back to you.
Please send your configuration files and the swagger file to [email protected] to make it easier for us to reproduce
I have just sent you a mail with the requested files.
@mvdan, I forgot to mention that you need to import (via a swagger file) an api into an existing api over and over again.
We’ve managed to reproduce the issue and are now working on a fix.
Thank you for the notification. Good to hear that you guys managed to reproduce this bug.
The good news is that the bug is fixed in master, the upcoming 2.4 release. So, while we were able to reproduce the issue, we are not going to release 2.3.10 for now. This issue is simply not critical enough on its own to warrant delaying 2.4 further. It might not seem like it, but even a bugfix release usually takes most of a week of work.
I can’t give a definite date for 2.4, but we are already freezing the milestone. Until it is released, there are multiple ways to work around the issue. The easiest one is disabling
enable_jsvm in your config, as we have found it’s the cause of the leak. That’s only possible if you don’t need to use JS plugins, of course.
Otherwise, you can always restart the gateway if the memory use increases too much. Hopefully that won’t be necessary too often.
If you have any more questions or issues, feel free to get in touch. Thanks!