Projects tigase _server server-core Issues #592
Connection closed when attempting large message transfer (#592)
Daniel Wisnewski opened 9 years ago

Copied from Forum Message:

Hi,

I am having an issue with Tigase Server (7.0.2), if the client requests a large amount of data the I get xmpp=XMPP error: code=404, type=wait, reason=recipient-unavailable

I tried setting:

--elements-number-limit[I] = 10000000

to see if this helped (the values are big for issue dubugging purposes) but it does not. The workflow is the client requests data, this request it processed by a component, the component replies using addOutPacket(Packet) and then processPacket(Packet) is called with the error packet. I checked and the XML string is 13094582 characters long (which is why I have the very high limit/size values above, to rule them out). I also checked and the client is not replying to Tigase, the msg never gets to the client. I really need this msg to be sent, it is not something that happens often but it does happen. I agree that it maybe better to limit the size and cut it up into multiple smaller msgs but for now this is how it is done and I need to fix it quickly.

I debugged Tigase and identified the reason I am getting this. In TLSIO you have a workaround in place in writeBuff(ByteBuffer) because you sometimes get an infinit loop (see the comment in your code). The workaround is setting a limit (max_loop_runs = 1000) and throwing an exception (EOFException("Socket has been closed due to TLS problems.")) if you hit half of this. The problem is I hit this limit when sending big msgs.

I said above this does not happen often for me because it is linked to the size of the data the client requested, when it does happen however the client is no longer able to function since it needs this data; usually in critical moments.

This workaround is still present in v7.1.0 (https://projects.tigase.org/projects/tigase-server/repository/revisions/master/entry/src/main/java/tigase/io/TLSIO.java) but seems ineffective in messages over a certain size.

%batrok can you have a look at this?

Daniel Wisnewski commented 9 years ago
wojciech.kapcia@tigase.net commented 9 years ago

int max_loop_runs bumped to 100000

Daniel Wisnewski commented 9 years ago

Awaiting feedback from user.

Daniel Wisnewski commented 9 years ago

Have had no feedback from user, assuming the issue is fixed. Closing issue.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
3655
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#592
Please wait...
Page is in error, reload to recover