pywebsocket error handling of "WebSocket frame is too long"

62 views
Skip to first unread message

wongeun

unread,
Nov 23, 2011, 11:13:36 PM11/23/11
to pywebsocket

I am using pywebsocket.


Now I am developing the chat server with pywebsocket apache version.
In the server side, I stored the request object in the array.
Message sender send chatting message to the receiver(iPhone safari
client) by saved request object of receiver. and it works well.

But after receiver turn off iPhone, I send message to that turned off
iPhone.
After turn off my iPhone again in the iPhone safari log "Websocket
frame is too long error" logged and socket connection closed.
And my server is downed.

http://farm6.static.flickr.com/5303/5628873732_76fc8f2391_m.jpg

I use "try" and "except" in the code in pywebsocket server side code,
but "try" can not catch that error.

My problem is when I tried to send some message to not closed
connection(but actually this connection is in the network slowness or
turned off mobile machine) error occurd. But there is no way to detect
this connection loss in the server side.


In my thinking, this blog author also have same problem with me.
http://dalelane.co.uk/blog/?p=1652

if there is someone who get the same problem or have any solution plz
reply~

plz give a solution for me, and give some example sample code.


thanks.

Takeshi Yoshino

unread,
Nov 28, 2011, 3:48:22 AM11/28/11
to pyweb...@googlegroups.com
Hi,

But after receiver turn off iPhone, I send message to that turned off
iPhone.
After turn off my iPhone again in the iPhone safari log "Websocket
frame is too long error" logged and socket connection closed.
And my server is downed.

Nothing logged on down?

Could you please use "--log_level debug" option to get more log messages for debugging?

Thanks
Reply all
Reply to author
Forward
0 new messages