Failure to start RedisClientSupervisor child process - Elixir + Phoenix - redis
I'm running an application with Elixir 1.7.2 and Phoenix but it randomly crashed with errors in one of my child processes.
I'm using a module called redix - {:redix, ">= 0.6.1"} which is handling my connection to Redis.
It crashed with the following error:
2019-05-16T07:29:08.929601+00:00 app[web.1]: 07:29:08.929 [info] Running ReviewedoWeb.Endpoint with Cowboy using http://:::46402
2019-05-16T07:29:09.191365+00:00 app[web.1]: 07:29:09.191 [info] Application reviewedo exited: Reviewedo.Application.start(:normal, []) returned an error: shutdown: failed to start child: Reviewedo.RedisClientSupervisor
2019-05-16T07:29:09.191385+00:00 app[web.1]: ** (EXIT) shutdown: failed to start child: Reviewedo.Accounts.Cache
2019-05-16T07:29:09.191387+00:00 app[web.1]: ** (EXIT) an exception was raised:
2019-05-16T07:29:09.191393+00:00 app[web.1]: ** (ArgumentError) the user in the Redis URI is ignored and should not be present, got: "h"
2019-05-16T07:29:09.191394+00:00 app[web.1]: (redix) lib/redix/uri.ex:30: Redix.URI.password/1
2019-05-16T07:29:09.191396+00:00 app[web.1]: (redix) lib/redix/uri.ex:15: Redix.URI.opts_from_uri/1
2019-05-16T07:29:09.191397+00:00 app[web.1]: (redix) lib/redix.ex:290: Redix.start_link/2
2019-05-16T07:29:09.191398+00:00 app[web.1]: (stdlib) supervisor.erl:365: :supervisor.do_start_child/2
2019-05-16T07:29:09.191399+00:00 app[web.1]: (stdlib) supervisor.erl:348: :supervisor.start_children/3
2019-05-16T07:29:09.191400+00:00 app[web.1]: (stdlib) supervisor.erl:314: :supervisor.init_children/2
2019-05-16T07:29:09.191402+00:00 app[web.1]: (stdlib) gen_server.erl:365: :gen_server.init_it/2
2019-05-16T07:29:09.191403+00:00 app[web.1]: (stdlib) gen_server.erl:333: :gen_server.init_it/6
2019-05-16T07:29:10.716373+00:00 app[web.1]: {"Kernel pid terminated",application_controller,"{application_start_failure,reviewedo,{{shutdown,{failed_to_start_child,'Elixir.Reviewedo.RedisClientSupervisor',{shutdown,{failed_to_start_child,'Elixir.Reviewedo.Accounts.Cache',{'EXIT',{#{'__exception__' => true,'__struct__' => 'Elixir.ArgumentError',message => <<\"the user in the Redis URI is ignored and should not be present, got: \\"h\\"\">>},[{'Elixir.Redix.URI',password,1,[{file,\"lib/redix/uri.ex\"},{line,30}]},{'Elixir.Redix.URI',opts_from_uri,1,[{file,\"lib/redix/uri.ex\"},{line,15}]},{'Elixir.Redix',start_link,2,[{file,\"lib/redix.ex\"},{line,290}]},{supervisor,do_start_child,2,[{file,\"supervisor.erl\"},{line,365}]},{supervisor,start_children,3,[{file,\"supervisor.erl\"},{line,348}]},{supervisor,init_children,2,[{file,\"supervisor.erl\"},{line,314}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,365}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,333}]}]}}}}}},{'Elixir.Reviewedo.Application',start,[normal,[]]}}}"}
2019-05-16T07:29:10.717128+00:00 app[web.1]: Kernel pid terminated (application_controller) ({application_start_failure,reviewedo,{{shutdown,{failed_to_start_child,'Elixir.Reviewedo.RedisClientSupervisor',{shutdown,{failed_to_start_child,'Elixir
2019-05-16T07:29:10.719206+00:00 app[web.1]:
2019-05-16T07:29:13.269465+00:00 heroku[web.1]: State changed from up to crashed
2019-05-16T07:29:13.189754+00:00 app[web.1]: Crash dump is being written to: erl_crash.dump...done
2019-05-16T07:29:13.256383+00:00 heroku[web.1]: Process exited with status 1
I hadn't made any source code changes before the crash and so I'm not sure what the cause is.
The error I'm seeing is this one:
https://github.com/whatyouhide/redix/blob/master/lib/redix/uri.ex#L31
It looks like it's trying to split my redis_url to get the user and password but it's coming up with h for the user. The redis_url that was generated for me looks similar to this:
redis://h:pf851f7d83mf93nrand0mha5hsh8kgl3h4334k73d82580bba59d4c237f33f24752c76c#ec2-45-81-27-450.region.compute.amazonaws.com:18324
Here are the modules that it is erroring on:
defmodule Reviewedo.RedisClientSupervisor do
#moduledoc """
Initiates Redis
"""
use Supervisor
alias Reviewedo.Accounts.Cache
def start_link do
Supervisor.start_link(__MODULE__, [])
end
def init(_) do
redis_url = System.get_env("REDIS_URL") || "redis://127.0.0.1:6379"
children = [
worker(Cache, [redis_url, :redix], [])
]
supervise(children, strategy: :one_for_one)
end
end
defmodule Reviewedo.Accounts.Cache do
#moduledoc """
Provides cache functionality
"""
def start_link(connection, name) do
Redix.start_link(connection, name: name)
end
def query(param), do: Redix.command(:redix, param)
def get(key), do: query(["get", key])
def set(key, value), do: query(["set", key, value])
def expire(key, seconds), do: query(["expire", key, seconds])
def del(key), do: query(["del", key])
def all_keys!() do
case query(["keys", "*"]) do
{:ok, keys} -> keys
_ -> raise Reviewedo.RedisConnectionError, query: "all_keys!/1"
end
end
def flushdb do
query(["flushdb"])
:ok
end
end
defmodule Reviewedo.RedisConnectionError do
#moduledoc """
Raised when a Cache query returns an error
This exception is raised by `Reviewedo.Accounts.Cache` and `Reviewedo.Accounts.CacheAPI` which:
"""
defexception [:message]
def exception(query: query) do
msg = "Redis connection error, calling query: `#{query}`"
%Reviewedo.RedisConnectionError{message: msg}
end
end
It looks as though it's failing to get my opts from the uri but I'm not quite sure why. The application is running fine locally so it must be something to do with the configuration on Heroku.
Has anyone experienced anything similar to this before or know what the problem might be?
Thanks in advance!
Related
Fix “owner #PID<…> exited with: shutdown” in tests for my terminate/2 method of Phoenix.Channel
Looking for a help with testing terminate/2 callback in my Channel. Test and setup looks like this: setup do :ok = Ecto.Adapters.SQL.Sandbox.checkout(MyApp.Repo) Ecto.Adapters.SQL.Sandbox.mode(MyApp.Repo, {:shared, self()}) {:ok, socket} = connect(UserSocket, %{token: "some_token"}) {:ok, %{}, socket} = subscribe_and_join(socket, "some_channel", %{}) %{socket: socket} end test "terminate/2", %{socket: socket} do # for avoiding "** (EXIT from #PID<...>) {:shutdown, :closed}" Process.unlink(socket.channel_pid) assert close(socket) == :ok # some additional asserts go here end In terminate/2 method I just call a helper module, let's name it TerminationHandler. def terminate(_reason, _socket) do TerminationHandler.call() end And call/0 method in TerminationHandler contains a DB query. It can look like this i.e def call() do users = User |> where([u], u.type == "super") |> Repo.all # line where error appears # some extra logic goes here end This is the error that I get periodically (maybe once in 10 runs) 14:31:29.312 [error] GenServer #PID<0.1041.0> terminating ** (stop) exited in: GenServer.call(#PID<0.1040.0>, {:checkout, #Reference<0.3713952378.42205187.247763>, true, 60000}, 5000) ** (EXIT) shutdown: "owner #PID<0.1039.0> exited with: shutdown" (db_connection) lib/db_connection/ownership/proxy.ex:32: DBConnection.Ownership.Proxy.checkout/2 (db_connection) lib/db_connection.ex:928: DBConnection.checkout/2 (db_connection) lib/db_connection.ex:750: DBConnection.run/3 (db_connection) lib/db_connection.ex:644: DBConnection.execute/4 (ecto) lib/ecto/adapters/postgres/connection.ex:98: Ecto.Adapters.Postgres.Connection.execute/4 (ecto) lib/ecto/adapters/sql.ex:256: Ecto.Adapters.SQL.sql_call/6 (ecto) lib/ecto/adapters/sql.ex:436: Ecto.Adapters.SQL.execute_or_reset/7 (ecto) lib/ecto/repo/queryable.ex:133: Ecto.Repo.Queryable.execute/5 (ecto) lib/ecto/repo/queryable.ex:37: Ecto.Repo.Queryable.all/4 (my_app) lib/my_app/helpers/termination_handler.ex:4: MyApp.Helpers.TerminationHandler.call/0 (stdlib) gen_server.erl:673: :gen_server.try_terminate/3 (stdlib) gen_server.erl:858: :gen_server.terminate/10 (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3 Last message: {:join, Phoenix.Channel.Server}Last message: {:join, Phoenix.Channel.Server} Would appreciate any responses regarding reasons of this error and possible ways to avoid it.
As stated in the documentation for GenServer.terminate/2: [...] the supervisor will send the exit signal :shutdown and the GenServer will have the duration of the timeout to terminate. If after duration of this timeout the process is still alive, it will be killed immediately. That is seemingly your case. DBConnection.checkout/2 seems to be waiting for the available connection to appear and this is lasted beyond the timeout. Hence the owner experiences a brutal kill. There could be two possible solutions: increase a timeout of shutdown (I would avoid that) increase an amount of allowed simultaneous database connections. The latter is likely needed in any case, since your pool seems to be full. That way the connection would be checked out immediately, and it should return in the timeout interval successfully.
This might help. defmacro leave_channel(socket) do quote do Process.unlink(unquote(socket).channel_pid) mref = Process.monitor(unquote(socket).channel_pid) ref = leave(unquote(socket)) assert_reply ref, :ok assert_receive {:DOWN, ^mref, :process, _pid, _reason} end end defmacro close_socket(socket) do quote do Process.unlink(unquote(socket).channel_pid) mref = Process.monitor(unquote(socket).channel_pid) close(unquote(socket)) assert_receive {:DOWN, ^mref, :process, _pid, _reason} end end
RSpec - uninitialized constant for instance double
I am getting a name error for a small API i am building with RSpec, using TDD methodology NameError: uninitialized constant ExpenseTracker::API::Ledger API.rb require "sinatra/base" require "json" module ExpenseTracker class API < Sinatra::Base def initialize(ledger: Ledger.new) # default value so callers can just say API.new and get the default #ledger = ledger super() # rest of initialization from Sinatra end # Later, callers do this ledger: Ledger.new app = API.new() post '/expenses' do JSON.generate('expense_id' => 42) end get '/expenses/:date' do JSON.generate([]) end end end api_spec.rb require_relative "../../../app/api" require "rack/test" module ExpenseTracker RecordResult = Struct.new(:success?, :expense_id, :error_message) RSpec.describe API do include Rack::Test::Methods def app API.new(ledger: ledger) end let(:ledger) { instance_double('ExpenseTracker::Ledger') } describe "POST /expense" do context "when the expenseis successfully recorded" do it 'returns the expense id'do allow(ledger).to receive(:record) .with(expense) .and_return(RecordResult.new(true, 417, nil)) post '/expense', JSON.generate(expense) parsed = JSON.parse(last_response.body) expect(parsed).to include('expense_id': 417) end it 'responds with a 200 (OK)' end context "when the expense fails validation" do it 'returns an error message' it 'responds with 422 (Unprocessable entity)' end end end end Below is the error that i am getting : An error occurred while loading ./api_spec.rb. Failure/Error: def initialize(ledger: Ledger.new) # default value so callers can just say API.new and get the default #ledger = ledger super() # rest of initialization from Sinatra end NameError: uninitialized constant ExpenseTracker::API::Ledger /Users/Denis/Desktop/TDD/Effective_Testing_with_Rspec3/04-acceptance-specs/expense_tracker/app/api.rb:7:in `initialize' /Users/Denis/Desktop/TDD/Effective_Testing_with_Rspec3/04-acceptance-specs/expense_tracker/app/api.rb:13:in `<class:API>' /Users/Denis/Desktop/TDD/Effective_Testing_with_Rspec3/04-acceptance-specs/expense_tracker/app/api.rb:5:in `<module:ExpenseTracker>' /Users/Denis/Desktop/TDD/Effective_Testing_with_Rspec3/04-acceptance-specs/expense_tracker/app/api.rb:4:in `<top (required)>' ./api_spec.rb:1:in `require_relative' ./api_spec.rb:1:in `<top (required)>' Am I missing something? i have tried to play around with passing the ledger: Ledger.new to app = API.new but not getting past this error. any help or ideas would be great !
Ok figured this one out, after a lot of head banging on the desk. I had to comment out the app = API.new as this is not yet implemented, every time i would load the file in the spec it would error me out. # Later, callers do this ledger: Ledger.new app = API.new() now on to the next failing spec lol !
WebSocket error occurred: wrong number of arguments (given 2, expected 1)
I try to create connection to cable server and subscribe on channel, but I get error with log: Started GET "/cable" for 172.20.0.1 at 2017-05-27 08:29:39 +0000 Started GET "/cable/" [WebSocket] for 172.20.0.1 at 2017-05-27 08:29:39 +0000 Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: upgrade, HTTP_UPGRADE: websocket) WebSocket error occurred: wrong number of arguments (given 2, expected 1) My code: // order_slots.coffee jQuery(document).ready -> //some jquery code that call create_channel function create_channel = (order_id) -> App.cable.subscriptions.create { channel: "OrderSlotsChannel", order_id: order_id }, connected: -> # Called when the subscription is ready for use on the server disconnected: -> # Called when the subscription has been terminated by the server received: (data) -> # Data received Specific channel: //order_slots_channel class OrderSlotsChannel < ApplicationCable::Channel def subscribed stream_from "order_slots_#{params[:order_id]}_channel" end def unsubscribed; end end And ActionCable connection: # Be sure to restart your server when you modify this file. Action Cable runs in a loop that does not support auto reloading. module ApplicationCable class Connection < ActionCable::Connection::Base identified_by :current_user def connect self.current_user = find_verified_user logger.add_tags 'ActionCable', current_user.email end protected def find_verified_user verified_user = env['warden'].user verified_user || reject_unauthorized_connection end end end ActionCable::Channel::Base - is just empty. I will appreciate any help. Thanks in advance
I solved this problem. The project used Passenger Phusion as application server and 5.0.x version badly combine with rails 5.1 and action cable. You should update passenger up to 5.1.x
Resque with Rails 3 + Heroku + RedisToGo giving Postgresql error
I'm writing an app which needs to send many emails and creates many user notifications because of these emails. This task produces a timeout in Heroku. To solve this, I decided to use Resque and RedistToGo. What I did was to send the email (it's actually just one email because we use Sendgrid to handle this) and create the notifications using a Resque worker. The email is already created, so I send its id to the worker, along with all the recipients. This works fine locally. In production, unless we restart our app in Heroku, it only works once. I will post some of my code and the error message: #lib/tasks/resque.rake require 'resque/tasks' task "resque:setup" => :environment do ENV['QUEUE'] = '*' end desc "Alias for resque:work (To run workers on Heroku)" task "jobs:work" => "resque:work" #config/initalizers/resque.rb ENV["REDISTOGO_URL"] ||= "redis://redistogo:some_hash#some_url:some_number/" uri = URI.parse(ENV["REDISTOGO_URL"]) Resque.redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password) Dir["#{Rails.root}/app/workers/*.rb"].each { |file| require file } #app/workers/massive_email_sender.rb class MassiveEmailSender #queue = :massive_email_queue def self.perform(email_id, recipients) email = Email.find(email_id.to_i) email.recipients = recipients email.send_email end end I've got an Email model which has an after_create that enqueues the worker: class Email < ActiveRecord::Base ... after_create :enqueue_email def enqueue_email Resque.enqueue(MassiveEmailSender, self.id, self.recipients) end ... end This Email model also has the send_email method which does what I said before I'm getting the following error message. I'm gonna post all the information Resque gives to me: Worker 9dddd06a-2158-464a-b3d9-b2d16380afcf:1 on massive_email_queue at just now Retry or Remove Class MassiveEmailSender Arguments 21 ["some_email_1#gmail.com", "some_email_2#gmail.com"] Exception ActiveRecord::StatementInvalid Error PG::Error: SSL error: decryption failed or bad record mac : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"emails"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:1139:in `async_exec' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:1139:in `exec_no_cache' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:663:in `block in exec_query' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log' /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /app/vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.3.2/lib/new_relic/agent/instrumentation/active_record.rb:31:in `block in log_with_newrelic_instrumentation' /app/vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.3.2/lib/new_relic/agent/method_tracer.rb:242:in `trace_execution_scoped' /app/vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.3.2/lib/new_relic/agent/instrumentation/active_record.rb:28:in `log_with_newrelic_instrumentation' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:662:in `exec_query' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:1264:in `column_definitions' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:858:in `columns' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/schema_cache.rb:12:in `block in initialize' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/model_schema.rb:228:in `yield' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/model_schema.rb:228:in `default' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/model_schema.rb:228:in `columns' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/model_schema.rb:237:in `columns_hash' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/relation/delegation.rb:7:in `columns_hash' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/relation/finder_methods.rb:330:in `find_one' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/relation/finder_methods.rb:311:in `find_with_ids' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/relation/finder_methods.rb:107:in `find' /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/querying.rb:5:in `find' /app/app/workers/massive_email_sender.rb:5:in `perform' According to this, the first argument is the email id, and the second one is the list of all recipients... exactly as it should be. Can anyone help me? Thanks!
I've run into the same problem. Assuming you're using Active Record you have to call ActiveRecord::Base.establish_connection for each forked Resque worker to make sure it doesn't have a stale database connection. Try putting this in your lib/tasks/resque.rake task "resque:setup" => :environment do ENV['QUEUE'] = '*' Resque.after_fork = Proc.new { ActiveRecord::Base.establish_connection } end
Callback URL works locally but not on remotely on Heroku
I have a callback URL that is outlined in the MessagesController like so: def message_create message = Message.new( :message => params[:PAYLOAD], :recipient => params[:DEST_ADDR], :api_message_id => params[:MSG_ID], :from => params[:SRC_ADDR], :api_timestamp => params[:DATETIME], :network => params[:NETWORK], :origin => "sms") message.save redirect_to message end When I run my app locally this callback URL works just fine: http://localhost:3000/message_create?PAYLOAD=asdfasdf&DEST_ADDR=234523&MSG_ID=23452345&SRC_ADDR=24345234234&DATETIME=20110915130534&NETWORK=blah However, when I push the app to heroku and enter the same callback URL: http://myapp.heroku.com/message_create?PAYLOAD=asdfasdf&DEST_ADDR=234523&MSG_ID=23452345&SRC_ADDR=24345234234&DATETIME=20110915130534&NETWORK=blah It just gives me an error. I've looked into whether it's due to the: before_filter :authenticate line in my controller but even when that's commented out the data just won't submit to the remote DB. Your thoughts and experience are very-much appreciated. UPDATE: Just worked out how to access the full logs on Heroku. Looks like the issue might be to do with integer's not being large enough in Heroku by default: 2011-09-15T13:25:28+00:00 app[web.1]: Started GET "/message_create?PAYLOAD=asdfasdf&DEST_ADDR=234523&MSG_ID=23452345&SRC_ADDR=24345234234&DATETIME=20110915130534&NETWORK=blah" for 80.46.10.63 at 2011-09-15 06:25:28 -0700 2011-09-15T13:25:28+00:00 app[web.1]: Processing by MessagesController#message_create as HTML 2011-09-15T13:25:28+00:00 app[web.1]: Parameters: {"PAYLOAD"=>"asdfasdf", "DEST_ADDR"=>"234523", "MSG_ID"=>"23452345", "SRC_ADDR"=>"24345234234", "DATETIME"=>"20110915130534", "NETWORK"=>"blah"} 2011-09-15T13:25:28+00:00 app[web.1]: Completed in 10ms 2011-09-15T13:25:28+00:00 app[web.1]: 2011-09-15T13:25:28+00:00 app[web.1]: ActiveRecord::StatementInvalid (PGError: ERROR: integer out of range 2011-09-15T13:25:28+00:00 app[web.1]: : INSERT INTO "messages" ("message", "created_at", "updated_at", "recipient", "api_message_id", "from", "origin", "timestamps", "user_id", "status", "api_timestamp", "network", "group_id") VALUES ('asdfasdf', '2011-09-15 13:25:28.650894', '2011-09-15 13:25:28.650894', 234523, 23452345, 24345234234, 'sms', NULL, NULL, NULL, '2011-09-15 13:05:34.000000', 'blah', NULL) RETURNING "id"): 2011-09-15T13:25:28+00:00 app[web.1]: app/controllers/messages_controller.rb:48:in `message_create' 2011-09-15T13:25:28+00:00 app[web.1]: 2011-09-15T13:25:28+00:00 app[web.1]: 2011-09-15T13:25:28+00:00 heroku[router]: GET www.myherokuapp.com/message_create dyno=web.1 queue=0 wait=0ms service=14ms status=500 bytes=728 2011-09-15T13:25:28+00:00 heroku[nginx]: 80.46.10.63 - - [15/Sep/2011:06:25:28 -0700] "GET /message_create?PAYLOAD=asdfasdf&DEST_ADDR=234523&MSG_ID=23452345&SRC_ADDR=24345234234&DATETIME=20110915130534&NETWORK=blah HTTP/1.1" 500 728 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.12 Safari/535.2" www.myherokuapp.com
Yes it seems like a data type error, what data types did you set for your fields on the messages table migration?