Simultaneous writing are skipped (3 and more)
See original GitHub issueHello,
I have an issue with an express API when multiples request are processed in the same time, there are not all logged (rotating-file-stream: 2.1.4).
Here is a sample code:
const accessLogStream2 = rfs.createStream('access-test.log', {
interval: '1d',
path: path.join(__dirname, 'log'),
teeToStdout: true,
})
api.use((req, res, next) => {
console.log(`console ${Date.now()} ** ${req.url}`)
accessLogStream2.write(`rfs ${Date.now()} ** ${req.url}\n`)
next()
})
And here is the output:
console 1612715099666 ** /api/states?module=srm&logicalId=devices
console 1612715099667 ** /api/states?module=srm&logicalId=eth0-upload
console 1612715099669 ** /api/states?module=srm&logicalId=lbr0-upload
console 1612715099670 ** /api/states?module=srm&logicalId=eth0-download
console 1612715099671 ** /api/states?module=srm&logicalId=lbr0-download
rfs 1612715099666 ** /api/states?module=srm&logicalId=devices
rfs 1612715099667 ** /api/states?module=srm&logicalId=eth0-upload
...
console 1612715099691 ** /api/states/165
console 1612715099692 ** /api/states/168
console 1612715099692 ** /api/states/166
console 1612715099693 ** /api/states/169
console 1612715099694 ** /api/states/167
rfs 1612715099691 ** /api/states/165
rfs 1612715099692 ** /api/states/168
It seems that only 2 logs are logged 😞 Any idea?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Enabling or disabling simultaneous write protection provided ...
This prevents more than one virtual machine from inadvertently accessing the same .vmdk file. The multi-writer option allows VMFS-backed ...
Read more >Why is Scanner skipping nextLine() after use of other next ...
The nextLine() method of java.util.Scanner class advances this scanner past the current line and returns the input that was skipped.
Read more >Why doesn't exist not concurrent version of SkipList
I have described a set of algorithms that allow multiple pro- cessors to concurrently update a skip list in shared memory [Pug89a]. This ......
Read more >IT15468: "ANR3247W" CAUSED BY ABORT OF A BACKUP ...
Warning message: ANR3247W Process 1234 skipped 1 files on volume. ... scenario: The client is performing a backup using simultaneous write of a...
Read more >Modeling Dual Read/Write Paths for Simultaneous Machine ...
In this paper, we propose a method of dual-path SiMT which introduces duality constraints to direct the read/write path. According to duality ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It seems the problem is with Node.js v14, using it I have the same problem. On v12 the script works as expected. I’ll try to fix this
Thanks @iccicci, seems to be fixed 👍🏻