이 오류는 무엇을 의미합니까? [Erlang, Mochiweb, MySQL
문제
Erlang 및 Mochiweb과 혜성 채팅 서버를 만들었습니다. 그리고 서버를 시작하기 위해 "./start-dev.sh"를 실행합니다. 그러나 약 1 개월 후 다음 오류가 발생했습니다.
=ERROR REPORT==== 26-Sep-2009::09:21:06 ===
{mochiweb_socket_server,235,
{child_error,
{badmatch,
{error,
[70,97,105,108,101,100,32,115,101,110,100,105,110,103,32,100,
97,116,97,32,111,110,32,115,111,99,107,101,116,32,58,32,
"closed"]}}}}
mysql: fetch "SELECT appKey FROM applications WHERE appID = 1" (id p1)
=CRASH REPORT==== 26-Sep-2009::09:21:10 ===
crasher:
initial call: mochiweb_socket_server:acceptor_loop/1
pid: <0.4271.23>
registered_name: []
exception error: no match of right hand side value
{error,[70,97,105,108,101,100,32,115,101,110,100,105,110,
103,32,100,97,116,97,32,111,110,32,115,111,99,
107,101,116,32,58,32,"closed"]}
in function moonwalker_web:loop/2
in call from mochiweb_http:headers/5
ancestors: [moonwalker_web,moonwalker_sup,<0.52.0>]
messages: []
links: [<0.54.0>,#Port<0.792854>]
dictionary: [{mochiweb_request_body,
<<"appID=1&appKey=keyy&userID=8048943&nickName=bill&buddies=N%3B×tamp=1253928070154">>},
{mochiweb_request_recv,true},
{mochiweb_request_post,
[{"appID","1"},
{"appKey","key"},
{"userID","8048943"},
{"nickName",[143,229,167,144]},
{"buddies","N;"},
{"timestamp","1253928070154"}]},
{mochiweb_request_path,"/online"}]
trap_exit: false
status: running
heap_size: 2584
stack_size: 24
reductions: 1368
neighbours:
=ERROR REPORT==== 26-Sep-2009::09:21:10 ===
{mochiweb_socket_server,235,
{child_error,
{badmatch,
{error,
[70,97,105,108,101,100,32,115,101,110,100,105,110,103,32,100,
97,116,97,32,111,110,32,115,111,99,107,101,116,32,58,32,
"closed"]}}}}
다음 숫자를 문자로 바꾸면
[70,97,105,108,101,100,32,115,101,110,100,105,110,103,32,100,
97,116,97,32,111,110,32,115,111,99,107,101,116,32,58,32,
"closed"]}}}}
그들은
Failed sending data on socket :"closed"
MySQL 연결이나 소켓에 문제가 있다는 것을 의미합니까? 이 오류가 내 "./start-dev.sh"와 관련이 있는지 또는 잘못 설정했는지 모르겠어요?
그리고 진단을 위해 어떤 정보를 제공해야합니까?
감사합니다. 답장을 기대하십니까?
해결책
루프/2 함수 어딘가에있는 것처럼 보입니다. {error, error} 함수 호출에서 반환을 처리하지 않습니다. 이로 인해 프로세스가 충돌하는 오류가 발생합니다. 코드가 없으면 오류 반환의 원인을 말하기가 어렵습니다.
제휴하지 않습니다 StackOverflow