Splunk Enterprise Security

Can you help us with the following "expandtoken" error?: "field larger than field limit (131072)"

sylim_splunk
Splunk Employee
Splunk Employee

I'm running the search below for more than 6 hours, which then gives this kind of error.

Error that I have:

Error in 'expandtoken' command: (Error) field larger than field limit (131072)

Below is the saved search that calls some macros but the error is from ES command, expandtoken

'notable'| expandtoken| search NOT 'suppression'  ...SNIP...
0 Karma
1 Solution

sylim_splunk
Splunk Employee
Splunk Employee

This has been caused by a csv module we use in the command, which is complaining about the content size of a field exceeding 128KB.
This can be worked around by increasing the max field size to, i.e 10MB. This will be fixed in the later release version, which is yet to be decided and can be remedied by following the steps below;


In your search head, go to "$SPLUNK_HOME/etc/apps/SA-Util/bin/ " and vi expandtoken.py

  1. In the expandtoken.py type ":13" to go to line 13.
  2. Then press "i" for input and add "csv.field_size_limit(10485760)",
  3. then press "esc" key and type ":wq" to save the change.

from SolnCommon.cexe import BaseChunkHandler
csv.field_size_limit(10485760) <<<<<< Add this line to the code.

class TokenFilters(object):

If you get the same results even after the change please feel free to contact Splunk Support with the details of the issue.

View solution in original post

sylim_splunk
Splunk Employee
Splunk Employee

This has been caused by a csv module we use in the command, which is complaining about the content size of a field exceeding 128KB.
This can be worked around by increasing the max field size to, i.e 10MB. This will be fixed in the later release version, which is yet to be decided and can be remedied by following the steps below;


In your search head, go to "$SPLUNK_HOME/etc/apps/SA-Util/bin/ " and vi expandtoken.py

  1. In the expandtoken.py type ":13" to go to line 13.
  2. Then press "i" for input and add "csv.field_size_limit(10485760)",
  3. then press "esc" key and type ":wq" to save the change.

from SolnCommon.cexe import BaseChunkHandler
csv.field_size_limit(10485760) <<<<<< Add this line to the code.

class TokenFilters(object):

If you get the same results even after the change please feel free to contact Splunk Support with the details of the issue.

Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...