こんにちは!
このプラグインは最新の安定版(2.5.2)で動作していないのでしょうか?以下のエラーが発生しています:
ジョブ例外: PG::InFailedSqlTransaction: エラー: 現在のトランザクションは失敗しており、トランザクションブロックの終了までコマンドは無視されます
David
こんにちは!
このプラグインは最新の安定版(2.5.2)で動作していないのでしょうか?以下のエラーが発生しています:
ジョブ例外: PG::InFailedSqlTransaction: エラー: 現在のトランザクションは失敗しており、トランザクションブロックの終了までコマンドは無視されます
David
2.5.2 で動作しています。
このエラーが発生した際、どのような操作を行っていたか詳しく教えていただけますか?
ユーザーのデータをダウンロードしようとすると、このエラーが発生します。インストールはセルフホスト型のテストサーバーで行われており、非スタッフメンバーへのメール送信は無効化されています。インストール時にバージョンを更新しました。インストール実行時に提案されたように、app.yml で別のテンプレートファイルを指すことで Postgres の更新を求められましたが、更新は行いませんでした。
このプラグインが原因だとは思えません。
PG エラーに関する他の報告もいくつかあり、これは「データベースに何らかの問題がある」という一般的なものだと思われます。
はい。カスタムフィールドへの挿入を行う自作プラグインをいくつか持っていますが、それがどのようにしてデータベースを破損させるのか分かりません。すべて正規の手順に従っています。
リンクしてくれてありがとう、そのエラーについて調べてみます。
エラーのバックトレースとジョブ名も投稿していただけませんか?
Job
Jobs::ExportCsvFile
バックトレース
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'
すべてのプラグインをアンインストールして動作を確認しましたが、同じエラーが発生します。他に考えられる原因はありますか?データベースが破損しているとのことですが、何か修復方法はありますか?バックアップを取得して、一旦削除し、復元するのはどうでしょうか?
これは legal tools プラグインとは関係ありません。そのプラグインはデータベース内のデータを一切変更しない(変更できない)ためです。標準的なテーブルとカラムに基づいてデータを読み取るだけです。
@piratdavid 他にどのようなプラグインをインストールされていましたか?もしよろしければ、データのダンプを angus@thepavilion.io までお送りいただければ、さらにサポートできるかもしれません。