Max Query Length Exceeded and Field Truncated
Robert Gabriel
ephemeric at gmail.com
Fri Mar 19 05:39:20 CET 2010
On 18 March 2010 19:07, Alan DeKok <aland at deployingradius.com> wrote:
> Robert Gabriel wrote:
>> Hello all,
>>
>> Our network had some change somewhere and now all MySQL insert queries
>> are failing
>> with the last field been truncated and the character count is always
>> 4097 from the CDRs
>
> What does that mean? What's a "character count"?
>
>> been sent by our NAS (Acme Packet SBC).
>>
>> Having looked at the source we see:
>>
>> src/modules/rlm_sql/conf.h
>> src/modules/rlm_sql/rlm_sql.c
>>
>> /* SQL defines */
>> #define MAX_QUERY_LEN 4096
>> #define SQL_LOCK_LEN MAX_QUERY_LEN
>>
>> I'm not sure here, can we just increase to 8192 etc. or is this being stupid?
>> Can I edit the above and recompile?
>
> Yes. But I fail to see why the SQL queries are huge. There's really
> no reason for this.
>
>> MySQL log (shortened for brevity's sake):
>>
>> INSERT into accounting (AcctStatusType, AcctTerminateCause,
>> CalledStationId, NASIdentifier, h323setuptime, h323connecttime,
>> h323disconnecttime, h323disconnectcause) values ('0', '0', '0', '0',
>> '0', '0', '0', 'sip:0738063114 at h
>
> Think a bit: that line looks truncated, but there is NO WAY it's 4K in
> size.
>
> Something else is going on. Find out what, and fix it.
>
> Alan DeKok.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
Alan, I don't appreciate your harsh response. One comes to these lists
for help not scorn and ridicule.
Character count meaning the below and as stated above (IT WAS
SHORTENED FOR BREVITY'S SAKE) so I didn't take up the whole post with
log lines
and surely now we can see it is 4KB in size (so it's 4096 bytes less
the semicolon my mistake).
Am I thinking a bit?
$> wc -c "INSERT into accounting (AcctStatusType, AcctTerminateCause,
CalledStationId, NASIdentifier, h323setuptime, h323connecttime,
h323disconnecttime, h323disconnectcause, SessionGenericId,
FlowID_FS1_F, FlowType_FS1_F, SessionIngressCallId,
SessionEgressCallId, FlowInRealm_FS1_F, FlowInSrcAddr_FS1_F,
FlowInSrcPort_FS1_F, FlowInDstAddr_FS1_F, FlowInDstPort_FS1_F,
FlowOutRealm_FS1_F, FlowOutSrcAddr_FS1_F, FlowOutSrcPort_FS1_F,
FlowOutDstAddr_FS1_F, FlowOutDstPort_FS1_F, CallingOctets_FS1,
CallingPackets_FS1, CallingRTCPPacketsLost_FS1,
CallingRTCPAvgJitter_FS1, CallingRTCPAvgLatency_FS1,
CallingRTCPMaxJitter_FS1, CallingRTCPMaxLatency_FS1,
CallingRTPPacketsLost_FS1, CallingRTPAvgJitter_FS1,
CallingRTPMaxJitter_FS1, SessionIngressRealm, SessionEgressRealm,
SessionProtocolType, CalledOctets_FS1, CalledPackets_FS1,
CalledRTCPPacketsLost_FS1, CalledRTCPAvgJitter_FS1,
CalledRTCPAvgLatency_FS1, CalledRTCPMaxJitter_FS1,
CalledRTCPMaxLatency_FS1, CalledRTPPacketsLost_FS1,
CalledRTPAvgJitter_FS1, CalledRTPMaxJitter_FS1, SessionChargingVector,
SessionChargingFunction_Address, FirmwareVersion, LocalTimeZone,
PostDialDelay, CDRSequenceNumber, SessionDisposition,
DisconnectInitiator, DisconnectCause, Intermediate_Time,
PrimaryRoutingNumber, OriginatingTrunkGroup, TerminatingTrunkGroup,
OriginatingTrunkContext, TerminatingTrunkContext, PAssertedID,
SIPDiversion, SIPStatus, IngressLocalAddr, IngressRemoteAddr,
EgressLocalAddr, EgressRemoteAddr, FlowID_FS1_R, FlowType_FS1_R,
FlowInRealm_FS1_R, FlowInSrcAddr_FS1_R, FlowInSrcPort_FS1_R,
FlowInDstAddr_FS1_R, FlowInDstPort_FS1_R, FlowOutRealm_FS1_R,
FlowOutSrcAddr_FS1_R, FlowOutSrcPort_FS1_R, FlowOutDstAddr_FS1_R,
FlowOutDstPort_FS1_R, FlowID_FS2_F, FlowType_FS2_F, FlowInRealm_FS2_F,
FlowInSrcAddr_FS2_F, FlowInSrcPort_FS2_F, FlowInDstAddr_FS2_F,
FlowInDstPort_FS2_F, FlowOutRealm_FS2_F, FlowOutSrcAddr_FS2_F,
FlowOutSrcPort_FS2_F, FlowOutDstAddr_FS2_F, FlowOutDstPort_FS2_F,
CallingOctets_FS2, CallingPackets_FS2, CallingRTCPPacketsLost_FS2,
CallingRTCPAvgJitter_FS2, CallingRTCPAvgLatency_FS2,
CallingRTCPMaxJitter_FS2, CallingRTCPMaxLatency_FS2,
CallingRTPPacketsLost_FS2, CallingRTPAvgJitter_FS2,
CallingRTPMaxJitter_FS2, FlowID_FS2_R, FlowType_FS2_R,
FlowInRealm_FS2_R, FlowInSrcAddr_FS2_R, FlowInSrcPort_FS2_R,
FlowInDstAddr_FS2_R, FlowInDstPort_FS2_R, FlowOutRealm_FS2_R,
FlowOutSrcAddr_FS2_R, FlowOutSrcPort_FS2_R, FlowOutDstAddr_FS2_R,
FlowOutDstPort_FS2_R, CalledOctets_FS2, CalledPackets_FS2,
CalledRTCPPacketsLost_FS2, CalledRTCPAvgJitter_FS2,
CalledRTCPAvgLatency_FS2, CalledRTCPMaxJitter_FS2,
CalledRTCPMaxLatency_FS2, CalledRTPPacketsLost_FS2,
CalledRTPAvgJitter_FS2, CalledRTPMaxJitter_FS2,
EgressFinalRoutingNumber ) values ('Stop', 'User-Request',
'<sip:27823246912 at 196.30.132.98:5060>', 'acmepacket', '14:47:22.831
GMT+2 MAR 12 2010', '14:47:36.670 GMT+2 MAR 12 2010', '14:50:10.179
GMT+2 MAR 12 2010', '1', '', 'localhost:652024', 'G729',
'310075-3477386742-88078 at nextone-msw.mydomain.com',
'310075-3477386742-88078 at nextone-msw.mydomain.com', 'oscar_telecom',
'196.31.63.118', '15826', '172.28.18.226', '12450', 'QUESCFARM',
'10.0.64.10', '18334', '10.0.32.8', '11252', '624088', '7956', '72',
'215', '1784', '263', '2045', '41', '0', '45', 'oscar_telecom',
'QUESCFARM', 'SIP', '623574', '7945', '52', '3', '873', '4', '2047',
'60', '0', '24', '', '', 'C4.1.1 Patch 36 =28Build 60=29',
'GMT-02:00', '7157', '703923', '3', '1', '0', '',
'sip:0823246912 at 172.28.18.226', '', '', '', '', '', '', '0',
'172.28.18.226:5060', '196.30.132.98:5060', '0.0.0.0:0',
'10.0.32.8:5060', 'localhost:652025', 'G729', 'QUESCFARM',
'10.0.32.8', '11252', '10.0.64.10', '18334', 'oscar_telecom',
'172.28.18.226', '12450', '196.31.63.118', '15826',
'localhost:652026', '', 'oscar_telecom', '0.0.0.0', '0',
'172.28.18.226', '12492', 'QUESCFARM', '10.0.64.10', '18060',
'0.0.0.0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0',
'localhost:652027', '', 'QUESCFARM', '0.0.0.0', '0', '10.0.64.10',
'18060', 'oscar_telecom', '172.28.18.226', '12492', '196.31.63.118',
'15830', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0',
'sip:0823246912@;"
More information about the Freeradius-Users
mailing list