Hi,
you can try to increase the max_queue_size of the agent and/or the APM Server queue size.
Note that Elastic APM is not meant for or optimized for handling that many spans. What's your use case? Are you using the trace_methods option with wildcards?
Cheers,
Felix