error message while load testing

143 views
Skip to first unread message

Sandy Sanders Jr.

unread,
Nov 2, 2021, 2:43:50 PM11/2/21
to mountebank-discuss
Anyone seen this one?  It appears to be a file locking issue.  The frequency of the error decreases as we reduce load.

error: [https:3000] ::ffff:10.165.70.84:1650 X=> {"errno":-4048,"code":"EPERM","syscall":"rename","path":"C:\\temp\\mountebank-in-action-master\\mountebank-in-action-master\\ch05\\.mbdb\\3000\\stubs\\1635874350307-16608-5\\meta.json.tmp","dest":"C:\\temp\\mountebank-in-action-master\\mountebank-in-action-master\\ch05\\.mbdb\\3000\\stubs\\1635874350307-16608-5\\meta.json","message":"EPERM: operation not permitted, rename 'C:\\temp\\mountebank-in-action-master\\mountebank-in-action-master\\ch05\\.mbdb\\3000\\stubs\\1635874350307-16608-5\\meta.json.tmp' -> 'C:\\temp\\mountebank-in-action-master\\mountebank-in-action-master\\ch05\\.mbdb\\3000\\stubs\\1635874350307-16608-5\\meta.json'","name":"Error","stack":"Error: EPERM: operation not permitted, rename 'C:\\temp\\mountebank-in-action-master\\mountebank-in-action-master\\ch05\\.mbdb\\3000\\stubs\\1635874350307-16608-5\\meta.json.tmp' -> 'C:\\temp\\mountebank-in-action-master\\mountebank-in-action-master\\ch05\\.mbdb\\3000\\stubs\\1635874350307-16608-5\\meta.json'"}

Brandon Byars

unread,
Nov 7, 2021, 11:05:30 AM11/7/21
to Sandy Sanders Jr., mountebank-discuss
Yes, I have been unable to resolve file locking issues under load. There is some active development underway now to modularize the persistence mechanism, allowing a more scalable solution in the future.
-Brandon

On Tue, Nov 2, 2021 at 1:43 PM 'Sandy Sanders Jr.' via mountebank-discuss <mounteban...@googlegroups.com> wrote:
Anyone seen this one?  It appears to be a file locking issue.  The frequency of the error decreases as we reduce load.

error: [https:3000] ::ffff:10.165.70.84:1650 X=> {"errno":-4048,"code":"EPERM","syscall":"rename","path":"C:\\temp\\mountebank-in-action-master\\mountebank-in-action-master\\ch05\\.mbdb\\3000\\stubs\\1635874350307-16608-5\\meta.json.tmp","dest":"C:\\temp\\mountebank-in-action-master\\mountebank-in-action-master\\ch05\\.mbdb\\3000\\stubs\\1635874350307-16608-5\\meta.json","message":"EPERM: operation not permitted, rename 'C:\\temp\\mountebank-in-action-master\\mountebank-in-action-master\\ch05\\.mbdb\\3000\\stubs\\1635874350307-16608-5\\meta.json.tmp' -> 'C:\\temp\\mountebank-in-action-master\\mountebank-in-action-master\\ch05\\.mbdb\\3000\\stubs\\1635874350307-16608-5\\meta.json'","name":"Error","stack":"Error: EPERM: operation not permitted, rename 'C:\\temp\\mountebank-in-action-master\\mountebank-in-action-master\\ch05\\.mbdb\\3000\\stubs\\1635874350307-16608-5\\meta.json.tmp' -> 'C:\\temp\\mountebank-in-action-master\\mountebank-in-action-master\\ch05\\.mbdb\\3000\\stubs\\1635874350307-16608-5\\meta.json'"}

--
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/0a81e134-37c6-4fb4-9a74-e815ad07f7dcn%40googlegroups.com.

Sandy Sanders Jr.

unread,
Nov 9, 2021, 4:26:56 PM11/9/21
to mountebank-discuss
Thanks for the reply.  My first message was while recording.  We do see a similar one on playback.  That one is below.

{"level":"error","message":"[https:3000] ::ffff:10.164.71.201:4477 X=>

{\"code\":\"ELOCKED\",\"file\":\"C:\\\\mountebank-in-action-master\\\\mountebank-in-action-master\\\\ch05\\\\.mbdb\\\\3000\\\\stubs\\\\1636472876587-20628-29\\\\meta.json\",\"message\":\"Lock file is already being held\",\"name\":\"Error\",\"stack\":\"Error: Lock file is already being held\\n at C:\\\\Users\\\\SVC_PWV_ITST_D\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\mountebank\\\\node_modules\\\\proper-lockfile\\\\lib\\\\lockfile.js:68:47\\n at callback (C:\\\\Users\\\\SVC_PWV_ITST_D\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\mountebank\\\\node_modules\\\\graceful-fs\\\\polyfills.js:299:20)\\n at FSReqCallback.oncomplete (fs.js:192:5)\


Selvaraj Varadharajan

unread,
May 4, 2022, 9:35:03 PM5/4/22
to mountebank-discuss
Any possible fix or suggestions for the "ELOCKED" Lock file is already being held related error. This happens, when we do load test with --datadir ( file system based imposters). 

Brandon Byars

unread,
May 5, 2022, 11:11:53 AM5/5/22
to Selvaraj Varadharajan, mountebank-discuss
Hi Selvaraj,
The file locking issue is devilishly tricky to get rid of, and I admit my systems programming skills aren't up to the task. That said, creating the --datadir option forced an implicit interface for persistence that allow other storage options, and my hope is to release an extension this year that allows other persistence options like a document store or relational DB, both of which have teams of smart systems programmers backing them.
-Brandon


Ranjan Poudel

unread,
Feb 10, 2024, 6:33:36 PMFeb 10
to mountebank-discuss
Hi Brandon and team,

I noticed that we have this repository out there in terms of using Redis as a storage system for imposters. https://github.com/eljusto/mountebank-redis-repository

Question: Do I have to fork mountebank and install this extension/plugin to mountebank source code and then make a new image to be able to use Redis ? If not, is there an alternative repository or image that is open source that is already using Redis repository in mountebank ?

Any help would be highly appreciated. I love Mountebank. My team is trying to use it for load testing and we are running into similar file locking issues with FileBasedImposterRepository.

-Ranjan

Reply all
Reply to author
Forward
0 new messages