0

Ruby on Rails を使用しているアプリケーションに Vertical Response API を統合しました。

を使用してリストのメンバーを VR API に追加する際に問題に直面しています vr_obj_new.appendFileToList(sid, lid, csv_data)

このメソッドを呼び出すたびに、「Execution Expired」エラーが発生します。約 100,000 レコードを含むリストをアップロードしようとしました。CSV ファイルが巨大だったので、20000、10000、さらには 5000 レコードのチャンクを含む複数の CSV ファイルを送信しましたが、それでも同じエラーが発生します。私が得た主な発見の 1 つは、本番環境でこのエラーが発生しているのに、私の DEV 環境では問題なく動作しているということです。エラーの詳細については、添付のテキスト ファイルを参照してください。

私が分析したところ、これは次のようにHTTPClient条件を設定した本番環境でのタイムアウトの問題のようです。

client = HTTPClient.new
client.receive_timeout = 40000

しかし、うまくいきませんでした。

正確なエラーは次のとおりです。

execution expired
/var/lib/gems/1.8/gems/httpclient-2.3.4.1/lib/httpclient/timeout.rb:43:in `fill_rbuff'
/usr/lib/ruby/1.8/openssl/buffering.rb:107:in `gets'
/var/lib/gems/1.8/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:352:in `gets'
/var/lib/gems/1.8/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:879:in `parse_header'
/var/lib/gems/1.8/gems/httpclient-2.3.4.1/lib/httpclient/timeout.rb:131:in `timeout'
/var/lib/gems/1.8/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:875:in `parse_header'
/var/lib/gems/1.8/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:858:in `read_header'
/var/lib/gems/1.8/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:667:in `get_header'
/var/lib/gems/1.8/gems/httpclient-2.3.4.1/lib/httpclient.rb:1137:in `do_get_header'
/var/lib/gems/1.8/gems/httpclient-2.3.4.1/lib/httpclient.rb:1086:in `do_get_block'
/var/lib/gems/1.8/gems/httpclient-2.3.4.1/lib/httpclient.rb:887:in `do_request'
/var/lib/gems/1.8/gems/httpclient-2.3.4.1/lib/httpclient.rb:981:in `protect_keep_alive_disconnected'
/var/lib/gems/1.8/gems/httpclient-2.3.4.1/lib/httpclient.rb:886:in `do_request'
/var/lib/gems/1.8/gems/httpclient-2.3.4.1/lib/httpclient.rb:774:in `request'
/var/lib/gems/1.8/gems/httpclient-2.3.4.1/lib/httpclient.rb:684:in `post'
/var/lib/gems/1.8/gems/soap4r-1.5.8/lib/soap/streamHandler.rb:238:in `send_post'
/var/lib/gems/1.8/gems/soap4r-1.5.8/lib/soap/streamHandler.rb:172:in `send'
/var/lib/gems/1.8/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:179:in `route'
/var/lib/gems/1.8/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:143:in `call'
/var/lib/gems/1.8/gems/soap4r-1.5.8/lib/soap/rpc/driver.rb:181:in `call'
(eval):6:in `appendFileToList'
./lib/vertical_response.rb:102:in `appendFileToList'
/ebs/data/www/Whelan-Project-Manager/app/models/email.rb:74:in `append_list_to_vr'
/ebs/data/www/Whelan-Project-Manager/app/models/email.rb:71:in `each'
/ebs/data/www/Whelan-Project-Manager/app/models/email.rb:71:in `append_list_to_vr'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/performable_method.rb:20:in `send'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/performable_method.rb:20:in `perform'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/backend/base.rb:87:in `invoke_job_without_newrelic_transaction_trace'
(eval):3:in `invoke_job'
/var/lib/gems/1.8/gems/newrelic_rpm-3.3.0/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:253:in `perform_action_with_newrelic_trace'
/var/lib/gems/1.8/gems/newrelic_rpm-3.3.0/lib/new_relic/agent/method_tracer.rb:242:in `trace_execution_scoped'
/var/lib/gems/1.8/gems/newrelic_rpm-3.3.0/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:248:in `perform_action_with_newrelic_trace'
(eval):2:in `invoke_job'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:120:in `run'
/usr/lib/ruby/1.8/timeout.rb:67:in `timeout'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:120:in `run'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:119:in `run'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:177:in `reserve_and_run_one_job'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:104:in `work_off'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:103:in `times'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:103:in `work_off'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:78:in `start'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:77:in `start'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:74:in `loop'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:74:in `start'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:104:in `run'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:83:in `run_process'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons/application.rb:255:in `call'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons/application.rb:255:in `start_proc'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons/daemonize.rb:82:in `call'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons/daemonize.rb:82:in `call_as_daemon'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons/application.rb:259:in `start_proc'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons/application.rb:296:in `start'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons/application_group.rb:159:in `start_all'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons/application_group.rb:158:in `fork'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons/application_group.rb:158:in `start_all'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons/application_group.rb:157:in `each'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons/application_group.rb:157:in `start_all'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons/controller.rb:80:in `run'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons.rb:197:in `run_proc'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons/cmdline.rb:109:in `call'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons/cmdline.rb:109:in `catch_exceptions'
/var/lib/gems/1.8/gems/daemons-1.1.9/lib/daemons.rb:196:in `run_proc'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:81:in `run_process'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:75:in `daemonize'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:73:in `times'
/var/lib/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:73:in `daemonize'
script/delayed_job:5
4

1 に答える 1

0

この問題は解決されました。Vertical Response API 使用時のメールの衝突が原因でした。説明してみましょう。

Login、CreateList、CreateEmail などを実行するためにサブアカウント (Impersonate User フィールドに基づく) を使用する Vertical Response (VR) のパートナー API を使用していたため、VR にログインするにはメインのログインメール (ユーザー名) および偽装ユーザーの電子メール。

VR ログイン方法でメイン ログイン メールと偽装ユーザー メールの値を同じにすると、問題が発生しました。したがって、VR Partner API を使用する場合は、両方のメールの個別の値を保持する必要があります。これで問題は解決します。

于 2013-10-15T06:32:32.970 に答える