Error on modem model FX30S

Hello, I have an FX30S modem which gives me this error message when it receives a lot of SMS at the same time:

WMM_COMMNOTIFY
In: + CMTI: “SM”, 2 <0D>
In: + CMTI: “SM”, 2
New SAP line: 8 (GSM CALL HOLD, SMS REQUEST)
WaitFor: + CMGR:
Out: AT + CMGF = 0; + CMGR = 2 <0D>
SetMotCom (portLog = 9 [portTDS = 9] COM2 idxmot = 1 value = 2)
In: <0D>
In: <0A>
In: + CMS ERROR: 321 <0D>

Can you tell me where does the 321 error come from?

it comes from +CMGR which means Invalid memory index

do you know how to solve this problem?

never met such issue before.
You can try store SMS in different location by +CPMS.

I don’t know how to do that, do you have an example?

https://www.developershome.com/sms/cpmsCommand2.asp