Postgres Ssl Error Decryption Failed Or Bad Record Mac
Contents |
Sign in Pricing Blog Support Search GitHub This repository Watch 45 Star 732 Fork 61 wooey/Wooey
Psycopg2 Ssl Error: Decryption Failed Or Bad Record Mac
Code Issues 32 Pull requests 2 Projects 0 Pulse Graphs django ssl error: decryption failed or bad record mac New issue Postgres SSL error: decryption failed or bad record mac #31 Open mfitzp opened this
Sqlalchemy Ssl Error: Decryption Failed Or Bad Record Mac
Issue Aug 12, 2015 · 9 comments Projects None yet Labels bug Milestone No milestone Assignees mfitzp 5 participants Wooey member mfitzp python ssl error: decryption failed or bad record mac commented Aug 12, 2015 There is an error running Wooey on a Postgres database backend (and using the same backend for celery): [2015-08-12 13:19:33,616: ERROR/MainProcess] Unrecoverable error: OperationalError('SSL error: decryption failed or bad record mac\n',) Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) psycopg2.OperationalError: SSL error: celeryd_force_execv decryption failed or bad record mac This SO post mentions the error with another library and the solution suggests opening the DB connection within the job.The Heroku Postgres documentation makes it a bit clearer: The Postgres connection is shared between more than one process or thread. Typical offenders are Resque workers or Unicorn. Be sure to correctly establish the PG connection after the fork or thread has initialized to resolve this issue. mfitzp added the bug label Aug 12, 2015 Wooey member mfitzp commented Aug 12, 2015 This issue against celery mentions a similar problem: celery/celery#1564 To close the engine after fork you can use: from multiprocessing.util import register_after_fork engine = create_engine(...) register_after_fork(engine, engine.dispose) Wooey member mfitzp commented Aug 13, 2015 Have played with this some more. According to the referred issue you can work around this with CELERYD_FORCE_EXECV = True but doing that requires billiard with C extensions which the only version
here for a quick overview of the site Help
Django.db.utils.operationalerror: Ssl Error: Decryption Failed Or Bad Record Mac
Center Detailed answers to any questions you might have python decryption failed or bad record mac Meta Discuss the workings and policies of this site About Us Learn more about
Psycopg2 Multiprocessing
Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges https://github.com/wooey/Wooey/issues/31 Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up uWSGI, Flask, sqlalchemy, and postgres: SSL error: decryption failed or bad record mac up http://stackoverflow.com/questions/22752521/uwsgi-flask-sqlalchemy-and-postgres-ssl-error-decryption-failed-or-bad-reco vote 12 down vote favorite 9 I'm trying to setup an application webserver using uWSGI + Nginx, which runs a Flask application using SQLAlchemy to communicate to a Postgres database. When I make requests to the webserver, every other response will be a 500 error. The error is: Traceback (most recent call last): File "/var/env/argos/lib/python3.3/site-packages/sqlalchemy/engine/base.py", line 867, in _execute_context context) File "/var/env/argos/lib/python3.3/site-packages/sqlalchemy/engine/default.py", line 388, in do_execute cursor.execute(statement, parameters) psycopg2.OperationalError: SSL error: decryption failed or bad record mac The above exception was the direct cause of the following exception: sqlalchemy.exc.OperationalError: (OperationalError) SSL error: decryption failed or bad record mac The error is triggered by a simple Flask-SQLAlchemy method: result = models.Event.query.get(id) uwsgi is being managed by supervisor, which has a config: [program:my_app] command=/usr/bin/uwsgi --ini /etc/uwsgi/apps-enabled/myapp.ini --catch-exceptions directory=/path/to/my/app stopsignal=QUIT autostart=true autorestart=true and uwsgi's config looks like: [uwsgi] socket = /tmp/my_app.sock l
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss http://stackoverflow.com/questions/20661557/python-decryption-failed-or-bad-record-mac-when-calling-from-thread the workings and policies of this site About Us Learn more about https://www.postgresql.org/message-id/998A51D5-A23A-4278-AC67-6B90958B625F@decibel.org Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each decryption failed other. Join them; it only takes a minute: Sign up Python: decryption failed or bad record mac when calling from Thread up vote 3 down vote favorite I'm getting a "decryption failed or bad record mac" error in this code-fragment: conn = psycopg2.connect(...) cursor = conn.cursor() cursor.execute("SELECT id, ip FROM schema.table;") rows = cursor.fetchall() cursor.close() conn.commit() conn.close() This decryption failed or is called in the run() method of a Thread, several times in a while(True) loop. I'm just opening a connection to my PostgreSQL database using the psycopg2 driver. Any idea of how safe is opening db connections into Threads in Python? I don't know what is raising this error. python multithreading postgresql encryption database-connection share|improve this question edited Dec 18 '13 at 15:23 Kate Gregory 16.1k74478 asked Dec 18 '13 at 15:03 Iván 193112 Is the exception raised on every iteration of the loop? Which line is the one that actually raises it? –Wieland Dec 18 '13 at 15:27 Hello, it's raised at cursor.execute("SELECT id, ip FROM schema.table;"). It's not being thrown in every single iteration, it does few iterations right, then raises the error once and stop the execution. –Iván Dec 18 '13 at 15:35 Ok, looks like I've fixed the problem. I was creating too many connections and seems I was running out of memory or something. conn = None after conn.close() does the tric
pgsql-announce pgsql-bugs pgsql-docs pgsql-general pgsql-interfaces pgsql-jobs pgsql-novice pgsql-performance pgsql-php pgsql-sql pgsql-students Developer lists Regional lists Associations User groups Project lists Inactive lists IRC Local User Groups Featured Users International Sites Propaganda Resources Weekly News Re: SSL error: decryption failed or bad record mac From: Jim Nasby