Coder Social home page Coder Social logo

ngx_mongo's People

Contributors

piotrsikora avatar simpl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ngx_mongo's Issues

about ngx_mongo update

hello,mclyne
Recently I was looking at this ngx_mongo module and found this module didn't have update for mongodb, if fllow the mongo syntax, and set keyword conflict with nginx variables .
could you share some for example about update ?

Response incomplete/damaged

Hi!

We tried to use this software but unfortunately it didn't work. As I'm newbie in linux world, I'm not sure if I did something wrong or there is a bug in the software.

We're trying to request mongodb through nginx web server equipped with this module.
While one can see JSON in http response, it gets suddenly cut in the middle. But even the delivered portion of JSON contains some junk characters and is thus damaged.
Following message appears in the log:

2012/11/22 12:15:23 [error] 2616#0: *32 mongo_json: received last_buf while still processing BSON while sending to client, client: 10.32.33.156, server: localhost, request: "POST /query HTTP/1.1", upstream: "mongodb://127.0.0.1:27017", host: "nginx.bla-bla.com"

The same request in mono console works just fine and shows no junk characters.

We use
debian 6.0.6
nginx 1.2.5
mongodb 2.2.1

error: variable ‘mctx’ set but not used

I get the following error when I do make over the nginx source (after ./configure --add-module=../ngx_mongo):

-o objs/addon/src/ngx_http_mongo_module.o \
        ../ngx_mongo/src/ngx_http_mongo_module.c
../ngx_mongo/src/ngx_http_mongo_module.c: In function ‘ngx_http_mongo_create_predefined_request’:
../ngx_mongo/src/ngx_http_mongo_module.c:681:28: error: variable ‘mctx’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: *** [objs/addon/src/ngx_http_mongo_module.o] Error 1
make[1]: Leaving directory `/home/****/src/nginx-1.3.14'
make: *** [build] Error 2

I'm using Ubuntu 12.10 and the development version of Nginx 1.3.14 over Ubuntu 12.10

Ubuntu libyajl not found

For some reason, nginx will not compile with this module and keeps complaining that the libyajl module is not found.

the following response is given for dpkg -L libyajl-dev:
/.
/usr
/usr/lib
/usr/lib/libyajl_s.a
/usr/include
/usr/include/yajl
/usr/include/yajl/yajl_parse.h
/usr/include/yajl/yajl_gen.h
/usr/include/yajl/yajl_common.h
/usr/include/yajl/yajl_version.h
/usr/share
/usr/share/doc
/usr/share/doc/libyajl-dev
/usr/share/doc/libyajl-dev/copyright
/usr/lib/libyajl.so
/usr/share/doc/libyajl-dev/README
/usr/share/doc/libyajl-dev/TODO
/usr/share/doc/libyajl-dev/changelog.Debian.gz

I've even tried moving the yajl/ folder to /usr/loca/lib/ and the likes. :S ... any help?

Works only on little-endian systems

@renatop7 posted this in another issue:

Hi, I have an interest too in this module.

I tried to add it to nginx but I get the error:
"ngx_mongo works only on little endian platforms"

Is this because of nginx version?

cann't locate libyajl on CentOS6

$ rpm -qa | grep yajl
yajl-1.0.7-3.el6.x86_64
yajl-devel-1.0.7-3.el6.x86_64

$ rpm -ql yajl yajl-devel
/usr/bin/json_reformat
/usr/bin/json_verify
/usr/lib64/libyajl.so.1
/usr/lib64/libyajl.so.1.0.7
/usr/share/doc/yajl-1.0.7
/usr/share/doc/yajl-1.0.7/COPYING
/usr/share/doc/yajl-1.0.7/ChangeLog
/usr/share/doc/yajl-1.0.7/README
/usr/share/doc/yajl-1.0.7/TODO
/usr/include/yajl
/usr/include/yajl/yajl_common.h
/usr/include/yajl/yajl_gen.h
/usr/include/yajl/yajl_parse.h
/usr/lib64/libyajl.so
/usr/share/doc/yajl-devel-1.0.7
/usr/share/doc/yajl-devel-1.0.7/COPYING

sudo ln -s /usr/include/ /usr/local/include/yajl
sudo ln -s /usr/lib64/ /usr/local/lib/libyajl.so.1
sudo ln -s /usr/lib64/ /usr/local/lib/libyajl.so.1.0.7
sudo ln -s /usr/lib64/ /usr/local/lib/libyajl.so

Still Cannot Find!

yajl_free is not included

If using internal malloc, should include yajl_free to avoid memory leak

Referenace:

ngx_http_mongo_module.c

line : 1958 and line 1997

yajl = yajl_alloc(&ngx_http_mongo_json_to_bson_callbacks, NULL, &ctx);

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.