Using the Django framework, asynchronous tasks with celery, redis for queues
There was this problem, too many connection
Couldn ' t ack ' 5f41afc62d-a112-bef34d5de1cc ', Reason:connectionerror (' Too many connections ',)
Traceback (most recent): File "/srv/www/wom/env/lib/python2.6/site-packages/kombu/message.py", line 93 , in ack_log_error self.ack () File "/srv/www/wom/env/lib/python2.6/site-packages/kombu/ message.py ", line-in-ack self.channel.basic_ack (self.delivery_tag) File"/srv/www/wom/env /lib/python2.6/site-packages/kombu/transport/virtual/__init__.py ", line 566, in basic_ack Self.qos.ack (Delivery_tag) File "/srv/www/wom/env/lib/python2.6/site-packages/kombu/transport/redis.py", Line, in ack self._remove_from_indices (Delivery_tag). Execute () File "/srv/www/wom/env/ lib/python2.6/site-packages/redis/client.py ", line 1914, in execute self.shard_hint) File"/ srv/www/wom/env/lib/python2.6/site-packages/redis/connection.py ", line 395, in get_connection Connection = Self.make_connection () File "/srv/www/wom/env/lib/python2.6/site-packages/redis/connection.py ", line 402, in make_connection raise Connectionerror (" Too Many Connections ") Connectionerror:too many connections after reading the document, set a variable broker_pool_limit
New in version 2.3.
The maximum number of connections that can is open in the connection pool.
The pool is enabled by default since version 2.5, with a default limit of ten connections. This number can is tweaked depending on the number of threads/greenthreads (eventlet/gevent) using a connection. For example running Eventlet with + greenlets that use a connection to the broker, contention can arise and you should Consider increasing the limit.
If set to None or 0 The connection pool would be disabled and connections would be a established and closed for every Use.
The Default (since 2.5) is to use a pool of ten connections. Celery_redis_max_connectionsmaximum number of connections available in the REDIS connection pool used for sending and RETR Ieving results. Broker_transport_options
New in version 2.2.
A Dict of additional options passed to the underlying transport.
See your transport user manual for supported options (if any).
Example Setting the visibility timeout (supported by Redis and SQS transports):
Broker_transport_options = {' Visibility_timeout ': 18000} # 5 hours
To set up Max_connections to resolve the following issues
Redis celery Too many connection