Mountebank stability/logging

191 views
Skip to first unread message

Robert Treverton

unread,
Jun 17, 2021, 8:09:20 AM6/17/21
to mountebank-discuss
We have Mountebank running with a combination of stubs and using proxyAlways behavior. As the traffic increases we have seen instability and the app stopping regularly. We have not yet pinpointed the definite root cause but have implemented the -datadir argument for mb and the --max-old-space-size argument for node and this seems to have helped but not solved the issue. We have a lot of traffic with large request/responses running through the server and I would like to be able to not track the requests. Is there any way for it to not track/record the requests that go through while using proxyAlways? We are using datadir in conjunction with configfile because we do not really care about the non-stubbed requests. When they are written to the log file that is enough for us if it will help with stability. Do you have any other suggestions of where we should be investigating for stability root causes?

Thanks,
Rob

Brandon Byars

unread,
Jun 17, 2021, 10:20:47 AM6/17/21
to Robert Treverton, mountebank-discuss
Hi there,
There's a way not to record requests (set recordRequests = false at the imposter level), but proxies will still need to store enough details about the requests to make the predicates.

I think the next step to improving stability requires extending mountebank's persistence. Moving from all in memory to file storage helped clarify the internal interface that allows pluggable persistence, but didn't directly enable it, and the file approach leads to some unstable file locking that I've been unable to resolve. I believe that the best path is to extend that interface to support database storage. It's definitely a mountebank priority of mine, but unfortunately I've been struggling to free time for mountebank for the past couple months, so if you have the interest and bandwidth, I'm more than happy to give you advice on implementing your own DB connection, but I'm still a bit out implementing it myself.
-Brandon


--
You received this message because you are subscribed to the Google Groups "mountebank-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mountebank-discuss/436bf644-2397-4288-a1b3-cb77e248f133n%40googlegroups.com.

Robert Treverton

unread,
Jun 17, 2021, 11:11:50 AM6/17/21
to mountebank-discuss
Brandon,

Thanks for the suggestion about not recording, we will try it and see if it helps. We currently have 2 sets of imposters, this one for regular traffic and one for recording which will capture requests and has no stubs. We can switch back and forth as needed for capturing traffic when using live data for creating new stubs.

Thanks,
Rob
Reply all
Reply to author
Forward
0 new messages