I have a Wiremock project. It contains request - response json files, gitlab-ci.yaml and dockerfile. And also a GUI project related to wiremock project.
Because the old requests are stored to be matched with further requests, the program is throwing heap memory error.
So I need to add --no-request-journal option to make project not store request history.
Any suggestions?
The
--no-request-journal
is a command line option so where you add it will depend on whether you are running wiremock in docker or not. If you are running wiremock just from thejava
command then you can add the option onto the end like this:Documentation on this and other command line options can be found on the wiremock website - https://wiremock.org/docs/standalone/java-jar/
If you are running wiremock in docker you will need to add the
--no-request-journal
to the end of the docker comand:The above is a snippet from a script file I use to start wiremock in docker and you can see that we are setting a number of command line options for the port, verbose and the no-request-journal. For reference, the full script can be found here. More information on running wiremock in docker can be found here on the wiremock website - https://wiremock.org/docs/standalone/docker/
Once you have added the option using one of the above ways, you should be able to see if this has worked via the output in the console:
Note the
no-request-journal: true
in the output.The above examples were using version
3.2.0
of wiremock and thenightly
docker image.