Amiramix
unread,Aug 25, 2012, 10:12:12 PM8/25/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to zotonic-d...@googlegroups.com
I have no idea why but webmachine_mochiweb started crashing on any request. For example:
01:47:23.221 [error] CRASH REPORT Process <0.234.0> with 0 neighbours crashed with reason: {case_clause,{resource_zotonic_status,[{template,"home.tpl"}],[],none,[],[{zotonic_dispatch,home},{zotonic_host,zotonic_status}],".",[]}}
Sasl shows that crash is here:
2012-08-26 01:47:23 =CRASH REPORT====
crasher:
initial call: mochiweb_acceptor:init/3
pid: <0.234.0>
registered_name: []
exception error: no case clause matching {resource_zotonic_status,[{template,"home.tpl"}],[],none,[],[{zotonic_dispatch,home},{zotonic_host,zotonic_status}],".",[]}
in function webmachine_mochiweb:loop/2
in call from mochiweb_http:headers/5
in call from proc_lib:init_p_do_apply/3
ancestors: [webmachine_mochiweb,zotonic_sup,<0.94.0>]
messages: []
links: [<0.225.0>,#Port<0.7988>]
dictionary: []
trap_exit: false
status: running
heap_size: 2584
stack_size: 24
reductions: 1770
neighbours:
And the reason for crash is because that case:
case Dispatch of
doesn't match. The request contains 8 fields:
{resource_zotonic_status, [{template,"home.tpl"}], [], none, [], [{zotonic_dispatch,home},{zotonic_host,zotonic_status}], ".", []}
and the loop in webmachine_mochiweb expects 9 fields:
{Mod, ModOpts, HostId, HostTokens, Port, PathTokens, Bindings, AppRoot, StringPath} ->
webmachine_dispatcher returns 8 fields in try_host_binding, as well as z_sites_dispatcher in method dispatch. What I don't understand is why it suddenly stopped working. I haven't changed any of that code and these files on github haven't changed for over 8 months. I am plainly doing something wrong but I can't figure out what. I am messing with starting Zotonic in the same VM as some other apps and for that I am creating my own boot scripts if that information may be of any help.
Any help would be greatly appreciated.