sungsilnom / jsmpp

Automatically exported from code.google.com/p/jsmpp
Apache License 2.0
0 stars 0 forks source link

serversession gives following exceptions on high load #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Get an SMPPServerSession
2. Push 50> sms per second from client
3. It gives following errors/

sommetimes:

java.io.IOException: Unexpected length of byte readed. Expecting 55 but 
only read 16
at org.jsmpp.DefaultPDUReader.readPDU(DefaultPDUReader.java:85)
at org.jsmpp.DefaultPDUReader.readPDU(DefaultPDUReader.java:61)
at org.jsmpp.session.SMPPServerSession$PDUReaderWorker.readPDU
(SMPPServerSession.java:500)

sometimes:

java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:375)
at org.jsmpp.DefaultPDUReader.readPDUHeader(DefaultPDUReader.java:41)
at org.jsmpp.session.SMPPServerSession$PDUReaderWorker.readPDU
(SMPPServerSession.java:499)
at org.jsmpp.session.SMPPServerSession$PDUReaderWorker.run
(SMPPServerSession.java:487)

What version of the product are you using? On what operating system?
I'm testing on linux / Debian 5. version is the latest available version 
on project home.

Please provide any additional information below.

Uudashr, first of all; i want to admit that it's a great pleasure to 
examine and play with your code. I loved your coding style and pattern 
usage. There's so much to get for me from those codes. Thank you very much 
for sharing those valuable code with the public.

I'm trying to develop an smpp - gateway server; whic is expected to handle 
500 sms/sec. I've developed the first version with very much help of your 
code. And at the testin phase. I'm using an smppclient(asynchronous) 
module which is also developed by me 2 years ago based on logica smpp. It 
has been used with more than 20 smsc's; and can push upto 400-500 sms/sec 
to other servers. With the gateway server i've developed; the best rate i 
get is 40 sms/sec. when i go over it; i get the above exceptions; which 
cause the smppserversession to get closed. i've tried incresing 
pduprocessordegree but nothing changed. i think no issue with it.

Hoping you to show me the right way :).

regards;

Original issue reported on code.google.com by uozt...@gmail.com on 13 Apr 2009 at 11:13

GoogleCodeExporter commented 8 years ago
Hi,

You are using SMPPServerSession for server side SMPP API which shows 
"Unexpected length of byte". Those 
exception thrown by JSMPP. JSMPP read the command_length 55, but the reading 
only 16.
Is not an error, on network application I think this is a common things. Thats 
why there is an exception, so we 
can retry the message submission or renew the session (reconnect).

The exception can be caused by the closed connection, either initiate by server 
or client. Closing a connection 
can be in purpose or is because there is no response in a several seconds so 
peer will close the connection in 
order to renew one.

To know the the main problem, maybe you need to watch the TCP packet using 
packet sniffer, snoop or 
ethereal.

I've been test JSMPP it can reach 3000-5000 sms per second, both client and 
server using JSMPP. So the 
problem might be not in JSMPP.

If you find any clue after snoop the TCP/IP packet and find something that is 
JSMPP cause this problem, please 
let me know. We will fix it.

Best regards

Original comment by uuda...@gmail.com on 20 Apr 2009 at 2:24

GoogleCodeExporter commented 8 years ago

Original comment by uuda...@gmail.com on 8 Jun 2011 at 2:58