Closed mikepaszkiewicz closed 7 years ago
Do you have mandrill configured? I haven't hit this issue before. Can you provide additional information, such as the exception itself?
Full error here - not sure where the logging module is dumping it's logs (current_app.logger.info
), so I've been having trouble debugging.
I removed the Mandrill code, and implemented a mailgun send. This only occurs in production, immediately after the account gets created...everything goes smoothly on the vagrant box.
ERROR Exception on /auth/free-trial [POST] Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask_restful/__init__.py", line 271, in error_router return original_handler(e) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/dist-packages/flask_limiter/extension.py", line 409, in __inner return obj(*a, **k)
File "./app/auth/views.py", line 512, in free_trial provision(form)
File "./app/auth/free_trial.py", line 103, in provision True)
File "./app/models/user_model.py", line 620, in send_email send_email(self.email, subject, html_body)
File "./app/email.py", line 11, in send_email _send_email.apply_async(args=[to, subject, html_body])
File "/usr/local/lib/python2.7/dist-packages/celery/app/task.py", line 565, in apply_async **dict(self._get_exec_options(), **options)
File "/usr/local/lib/python2.7/dist-packages/celery/app/base.py", line 354, in send_task reply_to=reply_to or self.oid, **options
File "/usr/local/lib/python2.7/dist-packages/celery/app/amqp.py", line 310, in publish_task **kwargs
File "/usr/local/lib/python2.7/dist-packages/kombu/messaging.py", line 172, in publish routing_key, mandatory, immediate, exchange, declare)
File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 457, in _ensured interval_max)
File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 369, in ensure_connection interval_start, interval_step, interval_max, callback)
File "/usr/local/lib/python2.7/dist-packages/kombu/utils/__init__.py", line 246, in retry_over_time return fun(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 237, in connect return self.connection
File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 742, in connection self._connection = self._establish_connection()
File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 697, in _establish_connection conn = self.transport.establish_connection()
File "/usr/local/lib/python2.7/dist-packages/kombu/transport/virtual/__init__.py", line 809, in establish_connection self._avail_channels.append(self.create_channel(self))
File "/usr/local/lib/python2.7/dist-packages/kombu/transport/virtual/__init__.py", line 791, in create_channel channel = self.Channel(connection)
File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 466, in __init__ self._disconnect_pools() File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 484, in _disconnect_pools self._async_pool.disconnect()
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 921, in disconnect connection.disconnect()
File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 854, in disconnect channel._on_connection_disconnect(self)
File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 498, in _on_connection_disconnect raise get_redis_ConnectionError() ConnectionError
removing current_app.logger.info on the email_send method fixed this, not entirely sure why