I have two nodejs apps. One is writing logs to a file using rotating-file-stream.
The second app needs to consume these logs and process by reading the log file as it is changing. Basically I am trying to setup a crude disk based queue. The issue I am seeing is that the consumer app is not able to see the logs until the stream from producer app is closed.
On this consumer app I tried fs.watch, chokidar and tail (I am not even getting change event). However, when I tried running 'tail -f' on the terminal that is able to pick up changes right away.
From what I found it seems like it is a platform related issue, which in my case is macOS. Using fs.watchFile instead of fs.watch fixed the issue. Thankfully the libraries I am using (chokidar and tail) provides api flags to do just that.
Related
I have a React App which I am running using serve command from Jenkins pipeline. One thing to note here is that I configured my Jenkins jobs to run indefinitely for logs. Below screenshot show how my app is running.
Aforesaid setup is running on Ubuntu server and my React App stops once the per-process file descriptor hard limit of 4096 is exhausted.
After a lot of investigation, I found that index.html file is getting opened periodically and is not getting closed so File Descriptor count keeps increasing over time. Also, while using app I have observed that there is no increase in count of index.html files i.e. I think its not tied to direct app usage.
Sever Side events is also already implemented for notifications, and I didn't have this issue so not sure if this issue is related to SSE.
Lastly, this started happening since recent release where multiple dependencies were updated and I changed package manager from npm to yarn.
Please note :
I am not looking for answers suggesting to increase file descriptor limit on Linux but figure out and resolve actual issue.
This project is built using create-react-app.
Node version is v14.21.1
Following https://docs.hiro.so/smart-contracts/devnet I can't get the command clarinet integrate to work. I have installed Docker on my mac and am running version 0.28.0 of clarinet. Running command within 'my-react-app/clarinet' where all clarity related files live (contracts, settings, tests, and Clarinet.toml).
My guess is it could be an issue with Docker?
The issue was that I downloaded my Devnet.toml file from a repo that was configured incorrectly. The configuration I needed was:
[network]
name = "devnet"
I increased the CPU and Memory in Docker as well.
There is an issue when the command attempts to spin up the stacks explorer, but I was informed that there are several existing issues with the stacks explorer from clarinet integrate at the moment.
Depending on how the last devnet was terminated, you could have some containers running. This issue should be fixed in the next incoming release, meanwhile, you'd need to terminate this stale containers manually.
Apart from Ludo's suggestions, I'd also look into your Docker resources. The default CPU/memory allocation should allow you to get started with Clarinet, but just in case, you could alter it to see if that makes a difference. Here's my settings for your reference:
Alternatively, to tease things out, you could reuse one of the samples (eg: hirosystems/stacks-billboard) instead of running your project. See if the sample comes up as expected; if it does, there could be something missing in your project.
I recently came across a bug in Flink, reported (https://issues.apache.org/jira/browse/FLINK-8685) and found out that it has been reported and a pull request has been created (https://github.com/apache/flink/pull/5174).
Now I clone 1.5-SNAPSHOT, apply the patch and build Flink. Even though it builds (no matter patch is applied or not), when I run Flink (using start-cluster.sh), web dashboard doesn't work and command
tail log/flink-*-jobmanager-*.log returns "tail: cannot open 'log/flink-*-jobmanager-*.log' for reading: No such file or directory"
. I tested with a batch programs and surprisingly it returned results on terminal, but streaming programs and other things still don't work.
Any suggestions on this issue?
Thank you.
In case flink dashboard does not start change port in conf file and restart. Default port of flink could be occupied by other process in windows.
Also change log level for flink to debug.
I'm writing a ptrace based debugging/testing suite for an embedded application. The application runs on raraspbery-pi-like hardware and writes directly to the Linux framebuffer, without any display server involved. The testing suite should run on usual Linux/Amd64 with X-server. The main goal is that I don't want to change the source of the app and test it like it would run in the field.
Running this app in a X-session could cause the x-Server to crash and changing the app isn't an option right now. Hence my idea is, to redirect writes from the app to /dev/fb0 and generate some sort of image or stream of it. This interception of calls to open/ioctl/mmap could be done by using ptrace and/or LD_PRELOAD.
I'm not quite sure if this works at all. Isn't it possible on Linux to create a "faked" /dev/fbX device, or is there maybe an existing tool which I haven't found yet?
I'm trying to upload some video files using BackgroundUploader component.
It works great if I keep the application open until the transfer completes.
It also works great if the app is closed, the transfer is completed under the hood, which is great.
But it doesn't work if the application is restarted (rerun normally) before the transfer is finished. Simply put, there is no sign of error, the UploadOperation status is running but nothing happens anymore regarding this upload request.
I can see using WireShark that the transfer is stopped:
When the application starts there is no code that does anything regarding BackgroundUploader.
I don't know why but it behaves as normal when the app is not run from Visual Studio even if it is only Start Without Debugging.
Is this some kind of know issue or limitation?
What will happen with background transfers if the app is updated via Windows Store in the middile?