TERR Service (TERRSRV) not working with big data sets. Getting Error: "Error from TERR Service: Bad Request (400) - Unable to parse form content"

TERR Service (TERRSRV) not working with big data sets. Getting Error: "Error from TERR Service: Bad Request (400) - Unable to parse form content"

book

Article ID: KB0077660

calendar_today

Updated On: 06-11-2019

Products Versions
Spotfire Enterprise Runtime for R - Server Edition 10.x and higher

Description

TERR Service (TERRSRV) failed to execute Data Function with big data sets (For example: more than 6 million rows).

You may get below error when executing Data Function on TERR Service in both Spotfire Analyst and Web Player:

If you change logging level to DEBUG for TERR Service and reproduce the issue, you may get below error in TERR Service DEBUG logs:
------------------- 
2019-06-11T06:55:29,031 | WARN  | [qtp1603198149-15] o.e.j.s.HttpChannel: /job org.eclipse.jetty.http.BadMessageException: 400: Unable to parse form content
2019-06-11T06:55:29,047 | WARN  | [qtp1603198149-15] o.e.j.u.MultiPartInputStreamParser: Badly formatted multipart request
------------------- 

Issue/Introduction

TERR Service (TERRSRV) not working with big data sets. Getting Error: "Error from TERR Service: Bad Request (400) - Unable to parse form content"

Environment

All Supported OS

Resolution

- Login to Spotfire Server URL with Spotfire Administrator privilege.
- Stop TERR Service and its instance under Nodes and Services.
- Login to Node Manager server and go to "conf" folder where the TERR Service is installed (For example: C:\tibco\tsnm\10.0.0\nm\services\TERR service Windows-1.1.0.48-XXXX-XXXXX-XXXX-XXXXXX\conf )
- Open file "custom.properties" in this folder.
- Change below setting in this file:

From:
--------------
# The maximum file size allowed for upload.
spring.servlet.multipart.max-file-size: 100MB
spring.servlet.multipart.max-request-size: 100MB
----------------

To:
--------------
# The maximum file size allowed for upload.
spring.servlet.multipart.max-file-size: 200MB
spring.servlet.multipart.max-request-size: 200MB
----------------
Note: You need to tune max-file-size and max-request-size from 100 MB to more than that depending upon size of your file.

- Save this file and start TERR Service and its instance under Nodes and Services.

Additional Information

https://docs.tibco.com/pub/terrsrv/1.2.0/doc/html/GUID-31355A9B-24D7-49E4-A16E-F9EB0D41E3D1.html