Excessively high greenlet default leads to connection pool timeouts in oslo.db

Bug #1535375 reported by Roman Podoliaka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.db
Fix Released
Medium
Roman Podoliaka
oslo.service
Fix Released
Medium
Roman Podoliaka

Bug Description

In oslo.service we default to 1000 greenlets in the pool for a WSGI server:

   cfg.IntOpt('wsgi_default_pool_size',
                         default=1000,
                         help="Size of the pool of greenthreads used by wsgi")

Which means up to $wsgi_default_pool_size HTTP requests will be processed concurrently by 1 fork of an OpenStack API service.

It turned out that this does not play well with oslo.db defaults for a pool of DB connections, which default to SQLAlchemy settings, which only allow to have up to 5 connections in pool and 10 overflow (will be closed once returned to the pool).

With such defaults it's easy to start seeing timeout errors (SQLAlchemy gives up waiting on a connection to be available from pool/overflow after 30s by default) in service logs even with moderate concurrency.

For DB oriented services (most of OpenStack APIs) we should decrease the number of greenlets in pool and increase max_overflow value for DB connections.

More context: http://lists.openstack.org/pipermail/openstack-dev/2015-December/082717.html

Changed in oslo.service:
assignee: nobody → Roman Podoliaka (rpodolyaka)
Changed in oslo.db:
assignee: nobody → Roman Podoliaka (rpodolyaka)
status: New → Confirmed
Changed in oslo.service:
status: New → Confirmed
Changed in oslo.db:
importance: Undecided → Medium
Changed in oslo.service:
importance: Undecided → Medium
description: updated
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/oslo.db 4.6.0

This issue was fixed in the openstack/oslo.db 4.6.0 release.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/oslo.service 1.7.0

This issue was fixed in the openstack/oslo.service 1.7.0 release.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/oslo.db 4.6.0

This issue was fixed in the openstack/oslo.db 4.6.0 release.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/oslo.service 1.7.0

This issue was fixed in the openstack/oslo.service 1.7.0 release.

Changed in oslo.service:
status: Confirmed → Fix Released
Changed in oslo.db:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.