Closed niteshtripathi1234 closed 3 years ago
Hi @niteshtripathi1234
Please review issue https://github.com/farhadi/node-smpp/issues/109#issuecomment-535436988
Answering https://github.com/farhadi/node-smpp/issues/109#issuecomment-845632992 here
Given the problem comes from fromStream method, you are receiving a PDU which length is way too long. You should contact whoever is sending that PDU to discuss the reason
Command length is read from the first 4 bytes of the packet: https://github.com/farhadi/node-smpp/blob/master/lib/pdu.js#L44
More information on the protocol itself can be found here and here
Client error Error: PDU length was too large (1768176397, maximum is 16384).
is the problem resolved if I increase the limit of PDU manually? smpp.PDU.maxLength = 2000000000; please confirm.
@niteshtripathi1234 as per my previous message:
a PDU of 1.6GB is way, way, way too long, changing maxLength should avoid receiving this error, but your real problem is receiving a PDU that big. Clearly that length is off, there is something wrong with whomever is sending that PDU
I'm closing this issue because it was answered, no feedback was given, and new issues are being discussed from this user that leads to believe this was fixed
Client error Error: PDU length was too large (1095586128, maximum is 16384). at Function.PDU.fromStream (/app/node_modules/smpp/lib/pdu.js:49:9) at Session._extractPDUs (/app/nodemodules/smpp/lib/smpp.js:59:20) at Socket.emit (events.js:189:13) at emitReadable (_stream_readable.js:535:12) at process._tickCallback (internal/process/next_tick.js:63:19)
import as _ from 'lodash'; import { config } from '../config'; import as smpp from 'smpp'; import as controller from '../controller'; import as winston from 'winston'; import { IMessage } from 'src/interfaces';
const logger = winston.createLogger({ level: 'info', format: winston.format.json(), defaultMeta: { service: 'user-service' }, transports: [ new winston.transports.File({ filename: 'receive.log' }) ] });
export default class SMPP {
} This was my code for SMPP.