I was testing my asterisk server with sipp (traffic generator). The server is a t1.micro amazon ec2 instance. My set up is as follows:
I have three instances, Server ‘A’ runs asterisk 12, with real-time configuration enabled and is the server I have to test. Server ‘B’ is the traffic generator and Server ‘C’ is another Asterisk 11 instance. Server C is registered as a Trunk in Server A. Server A,B runs on Ubuntu 14.04 and Server C is a pbx in a flash instance. Server B and C are m1.medium instances.
Server B registers as real-time extensions in server A and dials to extension 1000. The 1000 extension dials SIP/SERVER-C/1000 which plays an audio.
The Server B - Server A connections are encrypted(signalling via TLS and each RTP is RTP/SAVPF with crypto AES_CM_128_HMAC_SHA1_80 and AES_CM_128_HMAC_SHA1_32) but Server A - Server C connections are unencrypted.
The traffic I generated was as follows
1 call in 1 second, each call of 10 s duration. (1 call = REGISTER -> MAKE CALL -> HANGUP)
Hence maximum concurrent calls will be 10 calls (which i verified by ‘core show channels command’). The calls were generated from 10 different extensions. Qualify interval is 60s with OPTIONS message and 200 OK reply. Each call opens its own port and I have my ulimit value for asterisk set at 1024000.
The load average value in the server was below 0.50 and remains there when suddenly, this value spikes to 700 and asterisk crashes. The time for this crash is inversely proportional to the load. When I increase the load to 20 concurrent calls, this crash occurs faster and when I reduce it to 5 concurrent calls the crash is delayed. But it crashes anyway. All crashes happens after running for atleast 5 minutes.
The crash also occurs with no rtp and just TLS registrations and qualify when 2500 extensions were registered at a rate of 2 reg/sec over 900 s (15 minutes) with qualifyfreq 60s.
I don’t think this is a big load for asterisk and I’m not able to find out the reason behind this crash. And I couldn’t find anything in the logs. It just shows the registration and call logs. And by crash, I mean the asterisk service is stopped/killed.
Can anyone help me? Thanks in advance