[openstack-dev] [Gnocchi] Difference between Gnocchi-api and uwsgi

mate200 at mailbox.org mate200 at mailbox.org
Fri Jun 23 19:08:54 UTC 2017



On Thu, 2017-06-22 at 22:57 +0000, gordon chung wrote:
> 
> On 22/06/17 04:23 PM, mate200 at mailbox.org wrote:
> > Hello everyone !
> > 
> > I'm sorry that I'm disturbing you, but I was sent here from openstack-operators ML.
> > On my Mitaka test stack I installed Gnocchi as database for measurements, but I have problems with
> > api part. Firstly, I ran it directly executing gnocchi-api -p 8041. I noted the warning message and later rerun api
> > using uwsgi daemon. The problem that I'm faced with is a connection errors that appears in ceilometer-collector.log
> > approximately every 5-10 minutes:
> > 
> > 2017-06-22 12:54:09.751 1846835 ERROR ceilometer.dispatcher.gnocchi ConnectFailure: Unable to establish connection
> > to ht
> > tp://10.10.10.69:8041/v1/resource/generic/c900fd60-0b65-57b5-a481-
> > eaee8e116312/metric/network.incoming.bytes.rate/measures
> 
> 
> is this failing on all your requests or just some? do you have data in 
> your gnocchi?

Hello Gordon !

Yes I have data in gnocchi. Only some requests failing.


> > 
> > I run uwsgi with the following config:
> > 
> > [uwsgi]
> > #http-socket = 127.0.0.1:8000
> > http-socket = 10.10.10.69:8041
> 
> this should work but i imagine it's not behind a proxy so you could use 
> http instead of http-socket.

Yes I run it directly without http proxy server. With http option it doesn't start:

*** Starting uWSGI 2.0.12-debian (64bit) on [Fri Jun 23 19:03:56 2017] ***
compiled with version: 5.3.1 20160412 on 13 April 2016 08:36:06
os: Linux-4.4.0-81-generic #104-Ubuntu SMP Wed Jun 14 08:17:06 UTC 2017
nodename: ZABBIX1
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 2
current working directory: /root
detected binary path: /usr/bin/uwsgi-core
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
your processes number limit is 15650
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: enabled
Python version: 2.7.12 (default, Nov 19 2016, 06:48:10)  [GCC 5.4.0 20160609]
Python main interpreter initialized at 0x1280140
python threads support enabled
The -s/--socket option is missing and stdin is not a socket.


> > 
> > # Set the correct path depending on your installation
> > wsgi-file = /usr/local/bin/gnocchi-api
> > logto = /var/log/gnocchi/gnocchi-uwsgi.log
> > 
> > master = true
> > die-on-term = true
> > threads = 1
> > # Adjust based on the number of CPU
> > processes = 5
> > enabled-threads = true
> > thunder-lock = true
> > plugins = python
> > buffer-size = 65535
> > lazy-apps = true
> > 
> > 
> > I don't understand why this happens.
> > Maybe I should point wsgi-file as /usr/local/lib/python2.7/dist-packages/gnocchi/rest/app.wsgi ?
> 
> /usr/local/bin/gnocchi-api is correct... assuming it's in that path and 
> not /usr/bin/gnocchi-api
> 
> > Form uwsgi manual I read that direct parsing of http is slow. So maybe I need to use apache with uwsgi mod ?
> > 
> 
> not sure about this part. do you have a lot of metrics being pushed to 
> gnocchi? you can minimised connection requirements by setting 
> batch_size/batch_timeout for collector (i think mitaka should support 
> this?). i believe in the gate we have 2 processes assigned to uwsgi so 5 
> should be sufficient.
> 
> cheers,
> -- 
> gord

The quantity of metrics is very low. I'm not sure that batch_size works.
Regarding the batch_timeout. What will be when the timeout reached ? Will ceilometer throw error to the log file and
discard the whole batch ? I've got this timeout set to 300, but every minute I receive errors if api doesn't work
correctly. 


-- 
Best regards,
Mate200


> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list