Comments (10)
Follow-up:
I installed via easy_install instead but still got 150% CPU on my Docker process in OSX.
So it turns out it's the MONGO process that get's heavy CPU usage only when tailing it with this tool. (I'm running this Mongo within Docker too)
Still don't know how to debug this well…
from mongotail.
Hello @hedefalk ,
Yes, you are alright, some times when you execute the Mongotail with the -f
option, it take a lot of CPU consumption, I had the same issue with two different versions of Linux, but I didn't have time to profile the error to find where is the problem. I think the problem comes from the PyMongo driver, I'll try to profile Mongotail soon.
from mongotail.
As I said, I experimented the same issue in the past. Now I'm trying to reproduce again but tailing with the -f
option is working Ok, maybe it was solved n the latest PyMongo driver. Which version are you using? Did you try with the latest 3.4.0 version?
My test environment:
- PyMongo 3.4.0
- Mongotail 2.1.1
- MongoDB 3.2.1
- Ubuntu 14.04 x64
- Python 2.7 and 3.4
from mongotail.
MongoDB: 3.2.12
Python: 2.7.12
PyMongo, not a clue?
OSX 10.12.4. But MongoDB running from official docker image which is debian:jessie I think. I get this behaviour running mongotail as docker image too so should be pretty non-system dependent?
from mongotail.
To se the mongotail version:
mongotail --version
To see the PyMongo version:
python -c 'import pymongo; print pymongo.__version__'
Both versions are not specified in the Dockerfile (should be fixed), so depends of the day you run the first time the Docker container the versions of PyMongo and Mongotail are installed. Running outside docker, execute first sudo pip install --upgrade pymongo
or sudo easy_install --upgrade pymongo
to update the library to the latest version. Same for Mongotail.
from mongotail.
@hedefalk , I found when the problem happens: it just occurs when you are connecting with local databases. I couldn't reproduce the bug before because I was trying with a remote server, after tried with two different local servers, the problem happened again.
Profiling mongotail
I found that the problem looks like a driver issue, so I reported the bug to the PyMongo project: PYTHON-1276.
from mongotail.
@mrsarm Cool!
Sorry for not getting back, I seem to have missed this. Here's just for completeness:
~ ❯❯❯ mongotail --version
mongotail 2.1.1 <https://github.com/mrsarm/mongotail>
~ ❯❯❯ python -c 'import pymongo; print pymongo.__version__'
3.4.0
from mongotail.
Patch from @ShaneHarvey works Ok! Please @hedefalk test it. Released in Mongotail 2.1.2
from mongotail.
@mrsarm Awesome!
Python noob question, is this published in any of the channels I've used?
~ ❯❯❯ sudo easy_install mongotail
Searching for mongotail
Best match: mongotail 2.1.1
Processing mongotail-2.1.1-py2.7.egg
mongotail 2.1.1 is already the active version in easy-install.pth
Installing mongotail script to /usr/local/bin
Using /usr/local/lib/python2.7/site-packages/mongotail-2.1.1-py2.7.egg
Processing dependencies for mongotail
Finished processing dependencies for mongotail
I've only used this and docker…
from mongotail.
Try this:
~ ❯❯❯ sudo easy_install --upgrade mongotail
from mongotail.
Related Issues (20)
- `Mongotail EXCEPTION - Unknown command operation` when list collection indexes HOT 2
- Doesn't show sort properties HOT 3
- mongotail just closes HOT 12
- ImportError: cannot import name string_type HOT 2
- list query log don't show HOT 2
- `mongotail [db] --follow` exits after 1 second HOT 7
- No support of bytes/binary data coming from MongDB HOT 7
- Mongotail EXCEPTION - Unknown registry HOT 8
- Error: 'utf8' codec can't decode byte 0x80 (binary field) HOT 3
- Supposed to work with Mongo 4.0.1? HOT 1
- MongoDB Timestamp type is not supported HOT 3
- Mongotail EXCEPTION - Unknown registry HOT 10
- Cannot get queries to log; only DROP and INSERT show in the log HOT 7
- Replace deprecated API methods from PyMongo
- Crash for queries containing `MaxKey` / `MinKey` HOT 13
- Error parsing command line: Invalid database "portal," HOT 3
- Connection to mongodb atlas not possible HOT 10
- mongotail 3.0.0 not compatible with res-address 2.0.0 HOT 2
- Command values cased as findAndModify or mapReduce cause errors HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongotail.