Giter VIP home page Giter VIP logo

Comments (10)

hedefalk avatar hedefalk commented on June 20, 2024

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.

mrsarm avatar mrsarm commented on June 20, 2024

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.

mrsarm avatar mrsarm commented on June 20, 2024

@hedefalk,

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.

hedefalk avatar hedefalk commented on June 20, 2024

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.

mrsarm avatar mrsarm commented on June 20, 2024

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.

mrsarm avatar mrsarm commented on June 20, 2024

@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.

hedefalk avatar hedefalk commented on June 20, 2024

@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.

mrsarm avatar mrsarm commented on June 20, 2024

Patch from @ShaneHarvey works Ok! Please @hedefalk test it. Released in Mongotail 2.1.2

from mongotail.

hedefalk avatar hedefalk commented on June 20, 2024

@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.

mrsarm avatar mrsarm commented on June 20, 2024

Try this:

~ ❯❯❯ sudo easy_install --upgrade mongotail

from mongotail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.