User data export failing (transaction aborted)


Is this plugin broken int the latest stable (2.5.2)? Getting:

Job exception: PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block


Working for me on 2.5.2.
Can you please elaborate on what you are doing when you get this error?

I get this error when I try to download a user’s data. The installation is on a self hosted testing server and emailing is disabled for non-staff members. I updated the version when installing. I was asked to update Postgres but chose not to by pointing to another template file in app.yml, as suggested when running the installation.

I doubt that this is being caused by this plugin.

There are some more reports about that PG error and I think it is a generic ‘your database is borked somehow’ kind of thing.

OK. I have a bunch of self developed plugins that do inserts in custom fields but I don’t see how the db would be damaged by it. All by the book.

But thanks for linking, I’ll read up on that error.

Can you post the backtrace and job name of the error as well?

1 Like




rack-mini-profiler-2.0.2/lib/patches/db/pg.rb:69:in `exec_params'

rack-mini-profiler-2.0.2/lib/patches/db/pg.rb:69:in `exec_params'

activerecord- `block (2 levels) in exec_no_cache'

activesupport- `block in permit_concurrent_loads'

activesupport- `yield_shares'

activesupport- `permit_concurrent_loads'

activerecord- `block in exec_no_cache'

activerecord- `block (2 levels) in log'

activesupport- `block (2 levels) in synchronize'

activesupport- `handle_interrupt'

activesupport- `block in synchronize'

activesupport- `handle_interrupt'

activesupport- `synchronize'

activerecord- `block in log'

activesupport- `instrument'

activerecord- `log'

activerecord- `exec_no_cache'

activerecord- `execute_and_clear'

activerecord- `exec_query'

activerecord- `select'

activerecord- `select_all'

activerecord- `select_all'

activerecord- `find_by_sql'

activerecord- `execute'

activerecord- `find_by'

/var/www/discourse/app/models/concerns/has_url.rb:34:in `get_from_url'

/var/www/discourse/app/models/topic_link.rb:271:in `ensure_entry_for'

/var/www/discourse/app/models/topic_link.rb:128:in `block (2 levels) in extract_from'

activerecord- `transaction'

activerecord- `transaction'

/var/www/discourse/app/models/topic_link.rb:126:in `block in extract_from'

/var/www/discourse/app/models/topic_link.rb:124:in `each'

/var/www/discourse/app/models/topic_link.rb:124:in `extract_from'

/var/www/discourse/lib/post_creator.rb:576:in `extract_links'

/var/www/discourse/lib/post_creator.rb:180:in `block in create'

/var/www/discourse/lib/post_creator.rb:359:in `block in transaction'

activerecord- `block in transaction'

activerecord- `block in within_new_transaction'

activesupport- `block (2 levels) in synchronize'

activesupport- `handle_interrupt'

activesupport- `block in synchronize'

activesupport- `handle_interrupt'

activesupport- `synchronize'

activerecord- `within_new_transaction'

activerecord- `transaction'

activerecord- `transaction'

/var/www/discourse/lib/post_creator.rb:358:in `transaction'

/var/www/discourse/lib/post_creator.rb:174:in `create'

/var/www/discourse/lib/system_message.rb:44:in `block in create'

i18n-1.8.3/lib/i18n.rb:313:in `with_locale'

/var/www/discourse/lib/system_message.rb:44:in `create'

/var/www/discourse/lib/system_message.rb:13:in `create_from_system_user'

/var/www/discourse/app/jobs/regular/export_csv_file.rb:471:in `notify_user'

/var/www/discourse/app/jobs/regular/export_csv_file.rb:102:in `execute'

/var/www/discourse/app/jobs/base.rb:232:in `block (2 levels) in perform'

rails_multisite-2.3.0/lib/rails_multisite/connection_management.rb:68:in `with_connection'

/var/www/discourse/app/jobs/base.rb:221:in `block in perform'

/var/www/discourse/app/jobs/base.rb:217:in `each'

/var/www/discourse/app/jobs/base.rb:217:in `perform'

sidekiq-6.0.7/lib/sidekiq/processor.rb:196:in `execute_job'

sidekiq-6.0.7/lib/sidekiq/processor.rb:164:in `block (2 levels) in process'

sidekiq-6.0.7/lib/sidekiq/middleware/chain.rb:138:in `block in invoke'

/var/www/discourse/lib/sidekiq/pausable.rb:138:in `call'

sidekiq-6.0.7/lib/sidekiq/middleware/chain.rb:140:in `block in invoke'

sidekiq-6.0.7/lib/sidekiq/middleware/chain.rb:143:in `invoke'

sidekiq-6.0.7/lib/sidekiq/processor.rb:163:in `block in process'

sidekiq-6.0.7/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch'

sidekiq-6.0.7/lib/sidekiq/job_retry.rb:111:in `local'

sidekiq-6.0.7/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch'

sidekiq-6.0.7/lib/sidekiq.rb:37:in `block in <module:Sidekiq>'

sidekiq-6.0.7/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch'

sidekiq-6.0.7/lib/sidekiq/processor.rb:257:in `stats'

sidekiq-6.0.7/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch'

sidekiq-6.0.7/lib/sidekiq/job_logger.rb:13:in `call'

sidekiq-6.0.7/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch'

sidekiq-6.0.7/lib/sidekiq/job_retry.rb:78:in `global'

sidekiq-6.0.7/lib/sidekiq/processor.rb:124:in `block in dispatch'

sidekiq-6.0.7/lib/sidekiq/logger.rb:10:in `with'

sidekiq-6.0.7/lib/sidekiq/job_logger.rb:33:in `prepare'

sidekiq-6.0.7/lib/sidekiq/processor.rb:123:in `dispatch'

sidekiq-6.0.7/lib/sidekiq/processor.rb:162:in `process'

sidekiq-6.0.7/lib/sidekiq/processor.rb:78:in `process_one'

sidekiq-6.0.7/lib/sidekiq/processor.rb:68:in `run'

sidekiq-6.0.7/lib/sidekiq/util.rb:15:in `watchdog'

sidekiq-6.0.7/lib/sidekiq/util.rb:24:in `block in safe_thread'

I uninstalled all plugins to see if I could get this to work but still the same error. Any other ideas on what could be wrong? You’re saying the db is corrupt, can that be fixed somehow? back up, drop, restore perhaps?

This won’t be related to the legal tools plugin, as that doesn’t (and couldn’t) change any data in the db. It just reads data based on standard tables and columns.

@piratdavid What other plugins did you have installed? I could possibly help you further if you feel comfortable sending a dump of the data to

1 Like