User data export failing (transaction aborted)

Hi!

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

David

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

Job

Jobs::ExportCsvFile

Backtrace

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-6.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:675:in `block (2 levels) in exec_no_cache'

activesupport-6.0.3.1/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'

activesupport-6.0.3.1/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'

activesupport-6.0.3.1/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'

activerecord-6.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:674:in `block in exec_no_cache'

activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract_adapter.rb:722:in `block (2 levels) in log'

activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'

activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'

activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'

activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'

activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'

activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract_adapter.rb:721:in `block in log'

activesupport-6.0.3.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'

activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract_adapter.rb:712:in `log'

activerecord-6.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:673:in `exec_no_cache'

activerecord-6.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:654:in `execute_and_clear'

activerecord-6.0.3.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `exec_query'

activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:489:in `select'

activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:70:in `select_all'

activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/query_cache.rb:107:in `select_all'

activerecord-6.0.3.1/lib/active_record/querying.rb:46:in `find_by_sql'

activerecord-6.0.3.1/lib/active_record/statement_cache.rb:134:in `execute'

activerecord-6.0.3.1/lib/active_record/core.rb:204:in `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-6.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:278:in `transaction'

activerecord-6.0.3.1/lib/active_record/transactions.rb:212:in `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-6.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'

activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'

activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'

activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'

activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'

activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'

activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'

activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'

activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'

activerecord-6.0.3.1/lib/active_record/transactions.rb:212:in `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 angus@thepavilion.io.

1 Like